/*****************************************************************
**                                                              **
**  Copyright (C) 2007 Amlogic,Inc.                             **
**  All rights reserved                                         **
**        Revision : 1.0                                        **
**                                                              **
*****************************************************************/
#include "../menu.h"
#include "user.h"
#include "datasrc.h"
#include <os/extend/avtimer.h>
//#include "FileListEvent.h"
#include "NetmenuSetupEvent.h"
#include "../aw_sys_app.h"
//#include "../aw_network.h"
#include "../aw_config.h"
#include "../resource/string_dat.h"
#include "../aw_init_display.h"
#include "../logo_dat.h"
#include "LogoEvent.h"
#include "filenav.h"
#include "ctrlconvert.h"
#include "volatile_read.h"

#ifdef ENABLE_NETWORK
#define MENU_NETWORK 8
#define MENU_RSS   9
#endif

extern void SetupMenuRssPro(PHWND hwnd,unsigned char itemnum);
extern void SetupMenuNetWorkPro(PHWND hwnd,unsigned char itemnum);
//extern int SetupMenuDefaultPro(unsigned char itemnum);
#ifdef ENABLE_NETWORK
    #include "../aw_network.h"
    #include "net_app.h"
//    #include "../resource_network/string_dat.h"
    #include "WinwarnMessageBoxEvent.h"
    #include"Network_SetupEvent.h"
    extern INT8U menu_index_process;
    extern INT8U menu_index;
    extern INT32U network_status;
    extern int usbnet_device_plug;	    
#endif

#ifdef ENABLE_NETWORK
extern struct aml_iw_config aml_wireless_config;
extern struct aml_netif_setting aml_network_config;
#endif
static INT8U Show_Net_State=0;

#ifdef ENABLE_NETWORK
#ifdef SURPORT_TVM
#define SETUPITEM_NUM 10 //delete TV system
#else
#define SETUPITEM_NUM 11
#endif
#else
#ifdef SURPORT_TVM
#define SETUPITEM_NUM 8 //delete TV system
#else
#define SETUPITEM_NUM 9
#endif
#endif

#define ITEM_NUM_PER_PAGE 8
#define SETUPMENUPAGE 2
#define MAXItem_id 8

#ifdef SUPPORT_VGA		
#define PREG_PIN_MUX_2					0x012000B8L
#define READ_MPEG_REG_ISA(reg)           (READ_VOLATILE_UINT32(reg)) 
#define WRITE_MPEG_REG_ISA(reg, val) *(volatile unsigned *) (reg) = (val)
#endif
extern INT8U isMute ;
extern INT8U CurrentOsdSize;
extern int pic_slide_show_mode;
extern int pic_watch_dog;
extern int pic_title_mode;
#ifdef WISTAR_VERSION
    extern char MsgChinese_wistar_mem[] ;
    extern char MsgEnglish_wistar_mem[] ;
#else
  #ifdef BIG5
    extern char MsgChinese_big5_mem[];
    extern char MsgEnglish_big5_mem[];
  #else
    extern char MsgChinese_mem[] ;
    extern char MsgEnglish_mem[] ;
  #endif
#endif
extern short volume_level[8];
extern unsigned char Volume_Value ;

INT8U lanuage_set = 0 ;
          
const  unsigned char* ICON_FOLDER_2;         
const  unsigned char* ICON_MUSIC_2;          
const  unsigned char* ICON_PHOTO_2;          
const  unsigned char* ICON_MOVIE_2;  

static unsigned char CurrentItemId = 0;
static unsigned char CurrentMenuPage = 1;
static unsigned char page_bottom_item = 7 ;
static unsigned char page_top_item = 0 ;

extern PHWND (*fpCreateMenuWinMoviePlayBack)();
extern PHWND (*fpCreateMenuWinVolumeSelect)();
extern PHWND (*fpCreateMenuWinFileList)();
extern PHWND (*fpCreateMenuWinFileTypeSelect)();
extern PHWND (*fpCreateMenuWinDeviceSelect)();
extern PHWND (*fpCreateMenuLoadingWin)();
extern PHWND (*fpCreateMenuWin15Pic)();
extern PHWND (*fpCreateWinSetupMenu)();
extern PHWND (*fpCreateMenuWinPicInfoBar)();
extern PHWND (*fpCreateMenuWinLogo)();
extern PHWND (*fpCreateMenuWinConfirm)();
extern PHWND (*fpCreateMenuWinAviSub)();
extern PHWND (*fpCreateScreenSaver)();
extern PHWND (*fpCreateMenuWinDebug)();

extern INT8U PicCmdResponse(AWMSG *pMsg, PCMDSET cmd_set);

extern unsigned char osdsettpval(unsigned char num,unsigned char level);


void SetTVOutput(void)
{
	INT8U display_mode = GetDisplayModePara(); 
	TvOutputConfig_t *tv_output_config;
	int hdmode;

	switch(CurrentOsdSize){
#ifndef SURPORT_TVM
		case OsdSize480i: 
			hdmode = DISPCTL_MODE_480I;
			break;
		case OsdSize480iCVBS: 
			hdmode = DISPCTL_MODE_480I;
			break;
		case OsdSize480p: 
			hdmode = DISPCTL_MODE_480P;
			break;
          #ifdef SUPPORT_VGA		
      		case OsdSizeVga:
			hdmode = DISPCTL_MODE_VGA;
			break;
          #endif
		case OsdSize576i:
			hdmode = DISPCTL_MODE_576I;
			break;
		case OsdSize576iCVBS:
			hdmode = DISPCTL_MODE_576I;
			break;
		case OsdSize576p: 
			hdmode = DISPCTL_MODE_576P;
			break;
#endif
	#ifdef TV_MODE_720P
		case OsdSize720p: 
			hdmode = DISPCTL_MODE_720P;
			break;
    #endif
	#ifdef TV_MODE_1080P
		case OsdSize1080p: 
    	 #ifdef TV_MODE_1080I						
			hdmode =DISPCTL_MODE_1080I; 
	 #else	
			hdmode =DISPCTL_MODE_1080P;
	#endif		
			break;
    #endif
#ifndef SURPORT_TVM
		default:
			hdmode = DISPCTL_MODE_480I;
			break;
#else
		default:
			hdmode = DISPCTL_MODE_720P;
			break;
#endif
    }
    tv_output_config = (TvOutputConfig_t *)checkout_tv_output_config(hdmode);
    if (display_mode==0) // 0 for 4:3TV and 1 for 16:9TV -- please not change
	{
        tv_output_config->screen_width = 4;
        tv_output_config->screen_height = 3;
    }else{
        tv_output_config->screen_width = 16;
        tv_output_config->screen_height = 9;
    }
}



_SETUP_MENU_ Setup_Menu[SETUPITEM_NUM] = {
//Page 1:0-7
	// 0
	{{0,0,0,0,MENU_LANGUAGE,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,LANGUAGE_ENGLISH_STR,DT_RESOURCE_STRING_DATA,0},
	  0,0,0,2,MuiltLanguageSwitch},
	// 1
	{{0,0,0,0,SLIDESHOW_DUR_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,SLIDE_TIME_3S_STR,DT_RESOURCE_STRING_DATA,0},
	  1,0,0,6,SlideDurAction},
	// 2
	{{0,0,0,0,SLIDESHOW_MODE_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,SLIDESHOW_MODE_1_STR,DT_RESOURCE_STRING_DATA,0},
	  2,0,0,11,SlideModeAction},
	// 3
	{{0,0,0,0,MUSIC_REPEAT_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,REPEAT_ONE_STR,DT_RESOURCE_STRING_DATA,0},
	  3,0,0,2,MusicRepeatAction},
	// 4
	{{0,0,0,0,MOVIE_REPEAT_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,REPEAT_ONE_STR,DT_RESOURCE_STRING_DATA,0},
	  4,0,0,2,MovieRepeatAction},
	// 5
	{{0,0,0,0,DISPLAY_MODE_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,DISPLAY_MODE_43_STR,DT_RESOURCE_STRING_DATA,0},
	  5,0,0,2,DisplayModeAction},
	// 6
#ifndef SURPORT_TVM 
#if defined (TV_MODE_720P)||defined (TV_MODE_1080P)
    #ifdef SUPPORT_VGA
	{{0,0,0,0,TV_SYSTEM_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,TV_SYSTEM_480I_STR,DT_RESOURCE_STRING_DATA,0},
	  6,0,0,8,TVOutPutModeAction}, //OsdSizeTotal-3+1
    #else
#ifdef WISTAR_VERSION
	{{0,0,0,0,TV_SYSTEM_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,TV_SYSTEM_480P_STR,DT_RESOURCE_STRING_DATA,0},
	  6,0,0,5,TVOutPutModeAction},
#else
	{{0,0,0,0,TV_SYSTEM_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,TV_SYSTEM_480I_STR,DT_RESOURCE_STRING_DATA,0},
	  6,0,0,7,TVOutPutModeAction},
#endif
    #endif	  
#else
    #ifdef SUPPORT_VGA
	{{0,0,0,0,TV_SYSTEM_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,TV_SYSTEM_480I_STR,DT_RESOURCE_STRING_DATA,0},
	  6,0,0,7,TVOutPutModeAction},
    #else
	{{0,0,0,0,TV_SYSTEM_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,TV_SYSTEM_480I_STR,DT_RESOURCE_STRING_DATA,0},
	  6,0,0,6,TVOutPutModeAction},
    #endif
#endif
#endif
	// 7
	{{0,0,0,0,AUTO_RUN_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,AUTO_RUN_OPEN_STR,DT_RESOURCE_STRING_DATA,0},
	  7,0,0,2,AutoRunAction},

#ifdef ENABLE_NETWORK 
	// 6
	{{0,0,0,0,NET_SET_STR,DT_RESOURCE_STRING_DATA,0},{0,0,0,0,PROPERTIES_STR,DT_RESOURCE_STRING_DATA,0},8,0,0,4,SetupMenuNetWorkPro},
	// 7
#ifdef HAS_FRAMECHANNEL_ONLY
	{{0,0,0,0,RSSID_STR,DT_RESOURCE_STRING_DATA,0},{0,0,0,0,FRAMECHANNEL_STR,DT_RESOURCE_STRING_DATA,0},9,0,0,1,SetupMenuRssPro},
#else
	{{0,0,0,0,RSSID_STR,DT_RESOURCE_STRING_DATA,0},{0,0,0,0,YAHOO_STR,DT_RESOURCE_STRING_DATA,0},9,0,0,3,SetupMenuRssPro},
#endif /* HAS_FRAMECHANNEL_ONLY */
//Page 2:8-15
	// 8
#endif
	{{0,0,0,0,DEFAULT_STR,DT_RESOURCE_STRING_DATA,0},
	 {0,0,0,0,0,DT_STRING_DATA,0},
	  10,0,0,0,DefaultAction},
};

static INT32U SelectBarYPos[8];
static INT32U SlideBarPos[SETUPITEM_NUM] ;

static INT32U SelectBarYPos_480[8] = {140,170,200,230,260,290,320,350}; //480i 480p
#ifdef SURPORT_TVM
static INT32U SlideBarPos_480[SETUPITEM_NUM] = {138,138+28,138+28*2,138+28*3,138+28*4,138+28*5,138+28*6,360};
#else
static INT32U SlideBarPos_480[SETUPITEM_NUM] = {138,138+28,138+28*2,138+28*3,138+28*4,138+28*5,138+28*6,138+28*7,360};
#endif

static INT32U SelectBarYPos_576[8] = {140+48,170+48,200+48,230+48,260+48,290+48,320+48,350+48};// 576i 576p
#ifdef SURPORT_TVM
static INT32U SlideBarPos_576[SETUPITEM_NUM] = {186,186+28,186+28*2,186+28*3,186+28*4,186+28*5,186+28*6,406};
#else
static INT32U SlideBarPos_576[SETUPITEM_NUM] = {186,186+28,186+28*2,186+28*3,186+28*4,186+28*5,186+28*6,186+28*7,406};
#endif

#ifdef TV_MODE_720P
static INT32U SelectBarYPos_720[8] = {230,271,312,353,394,435,476,517};// 720p
#endif

#ifdef TV_MODE_1080P
//static INT32U SelectBarYPos_1080[8] = {230+140,271+140,312+140,353+140,394+140,435+140,476+140,517+140};// 1080p
static INT32U SelectBarYPos_1080[8] = {320,320+61,320+61*2,320+61*3,320+61*4,320+61*5,320+61*6,320+61*7};// 1080p
#endif

#ifdef SURPORT_TVM
#ifdef TV_MODE_1080P
//static INT32U SlideBarPos_1080[SETUPITEM_NUM] = {236+140,236+36+140,236+36*2+140,236+36*3+140,236+36*4+140,236+36*5+140,236+36*6+140,520+140};
static INT32U SlideBarPos_1080[SETUPITEM_NUM] = {320,320+55,320+55*2,320+55*3,320+55*4,320+55*5,320+55*6,320+55*7,750};
#else
static INT32U SlideBarPos_720[SETUPITEM_NUM] = {236,236+36,236+36*2,236+36*3,236+36*4,236+36*5,236+36*6,520};
#endif
#else
#ifdef TV_MODE_1080P
//static INT32U SlideBarPos_1080[SETUPITEM_NUM] = {236+140,236+36+140,236+36*2+140,236+36*3+140,236+36*4+140,236+36*5+140,236+36*6+140,236+36*7+140,520+140};
static INT32U SlideBarPos_1080[SETUPITEM_NUM] = {320,320+55,320+55*2,320+55*3,320+55*4,320+55*5,320+55*6,320+55*7,750};
#else
static INT32U SlideBarPos_720[SETUPITEM_NUM] = {236,236+36,236+36*2,236+36*3,236+36*4,236+36*5,236+36*6,236+36*7,520};
#endif
#endif

#ifdef ENABLE_NETWORK

#define MENU_X_GAP    320

void get_ip_from_netif(void);
void SetupMenuNetWorkPro(PHWND hwnd,unsigned char itemnum)
{
	PHWND dir_hwnd=NULL;
	unsigned int bk_color;
	switch (itemnum)
	{
#ifdef ENABLE_NETWORK 
		case 0: 
			dir_hwnd = AWFindWinCtrlByName("WinSetupMenu") ;
			Show_Net_State=1;
			bk_color=AWSetForeground(0);
			AWFillRectTxt(0,0,800,480); 
			AWSetForeground(bk_color);
			if(GetNetEnablePara()==2)
			{
				AWAsciiPrintf(110,106,  "Status:"); 
				AWAsciiPrintf(MENU_X_GAP,106,  "Disabled"); 
			}
			else
		 	{
				AWAsciiPrintf(110,106,  "Status:"); 
				AWAsciiPrintf(MENU_X_GAP,106,  "Enabled"); 

				if(network_status != NETIF_STATUS_READY)
				{ 
					AWAsciiPrintf(110,136,  "Connecting:"); 
					AWAsciiPrintf(MENU_X_GAP,136,  "No"); 
				}
				else
				{ 
					AWAsciiPrintf(110,136,  "Connecting:"); 
					AWAsciiPrintf(MENU_X_GAP,136,  "Yes"); 

					AWAsciiPrintf(110,166,  "SSID:"); 
					AWAsciiPrintf(MENU_X_GAP,166,  aml_wireless_config.essid);

					AWAsciiPrintf(110,196,  "Encrypt:"); 
						
					switch(aml_wireless_config.security)
					{
						case 0:
							AWAsciiPrintf(MENU_X_GAP,196,  "Open");
							break;
						case 1:
							AWAsciiPrintf(MENU_X_GAP,196,  "WEP");
							break;
						case 2:
							AWAsciiPrintf(MENU_X_GAP,196,   "WPA");
							break;								 
					}

					AWAsciiPrintf(110,226,  "IP Mode:"); 
					if(aml_network_config.dhcp==1)
						AWAsciiPrintf(MENU_X_GAP,226,  "Auto");  
					else
						AWAsciiPrintf(MENU_X_GAP,226,  "Static");  

					AWAsciiPrintf(110,256,  ip_config_tittle[0]); 
					get_ip_from_netif();
					AWAsciiPrintf(MENU_X_GAP,256,  ip_config_info[0]); 

					AWAsciiPrintf(110,286,  ip_config_tittle[1]); 
					AWAsciiPrintf(MENU_X_GAP,286,  ip_config_info[1]); 

					AWAsciiPrintf(110,316,  ip_config_tittle[2]); 
					AWAsciiPrintf(MENU_X_GAP,316,  ip_config_info[2]); 

					AWAsciiPrintf(110,346,  ip_config_tittle[3]); 
					AWAsciiPrintf(MENU_X_GAP,346,  ip_config_info[3]); 
				    }
		    }
			AWPostMessage(dir_hwnd, WM_PAINT_FINISH, 0) ;				 
			break;
	  
		case 1: //auto
	
			menu_index= ID_MENU_INFO_SCANNING;
			GUIShowWindow("WinWarnMessageBox");   
//			change_message(menu_index);	
	 	  						
	 	  	Start_Scan();
	 	  	SetNetEnablePara(0);	  	 	  	
			break;
		case 2: //Manu
			menu_index= ID_MENU_MANUAL_MODE;
			GUIHideWindow("WinSetupMenu");
			GUIShowWindow("Network_Setup");
			dir_hwnd = AWFindWinCtrlByName("Scan_result") ;
			if(AWIsVisibleWinControl(dir_hwnd))
			{
                          AWHideWinControl(dir_hwnd);   
			}
			dir_hwnd = AWFindWinCtrlByName("ManuScan") ;
			if(!AWIsVisibleWinControl(dir_hwnd))
			{
                           AWShowWinControl(dir_hwnd,0);   
                           AWSetFocus(dir_hwnd) ;			
			}
			
			//func(Manul)
			SetNetEnablePara(1);
			break;
		case 3: //Disable	
				Set_WiFi_Status(0);
	                	menu_index= ID_MENU_NETWORK_DISABLE;
				
		 	  	GUIShowWindow("WinWarnMessageBox");
//				change_message(menu_index);	
				Setup_Menu[MENU_NETWORK].Item_id = Setup_Menu[MENU_NETWORK].OptionNum;				
				SetNetEnablePara(2);
				break;

		case 4: //Enable
	                	Set_WiFi_Status(1);
	                	menu_index= ID_MENU_NETWORK_ENABLE;
				
				GUIShowWindow("WinWarnMessageBox");
//				change_message(menu_index);	
				Setup_Menu[MENU_NETWORK].Item_id = 0;				
				SetNetEnablePara(3);				
				break;
		
		default:
			break;
//			return 0;
#else			
 		case 0: //auto
	
	 	         menu_index_process= ID_MENU_INFO_SCANNING;
		      
	 	  	GUIShowWindow("WinWarnMessageBox");   
//			change_message(menu_index);	
	 	  	Start_Scan();
	 	  	SetNetEnablePara(0);	  		 	  	
	 	  	
			break;
		case 1: //Manu
			menu_index_process= ID_MENU_MANUAL_MODE;
			GUIHideWindow("WinSetupMenu");
			GUIShowWindow("Network_Setup");
			  dir_hwnd = AWFindWinCtrlByName("Scan_result") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                         dir_hwnd = AWFindWinCtrlByName("ManuScan") ;
                         if(!AWIsVisibleWinControl(dir_hwnd))
                          {
                           AWShowWinControl(dir_hwnd,0);   
                           AWSetFocus(dir_hwnd) ;			
                          }
			
			//func(Manul)
			SetNetEnablePara(1);
			break;
		case 2: //Disable	
	                	Set_WiFi_Status(0);
	                	menu_index= ID_MENU_NETWORK_DISABLE;
					
		 	  	GUIShowWindow("WinWarnMessageBox");
//				change_message(menu_index);
				Setup_Menu[MENU_NETWORK].Item_id = Setup_Menu[MENU_NETWORK].ItemNum;				
			    SetNetEnablePara(2);
			break;

		case 3: //Enable
	                	Set_WiFi_Status(1);
	                	menu_index_process= ID_MENU_NETWORK_ENABLE;
					
				GUIShowWindow("WinWarnMessageBox");
//				change_message(menu_index);
				Setup_Menu[MENU_NETWORK].Item_id = 0;				
				SetNetEnablePara(3);				
			break;
		
		default:
			break;
//			return 0;
#endif
	}
//	return 1;
}
INT8U menu_index = 0;
void SetupMenuRssPro(PHWND hwnd,unsigned char itemnum)
{
	PHWND dir_hwnd=NULL;
	switch (itemnum)
	{
		case 0: //Yahoo
#ifndef HAS_FRAMECHANNEL_ONLY
			//func(Manul)
			//menu_index_process=ID_INTERNET_YAHOO_SETTING;
			menu_index = ID_INTERNET_YAHOO_SETTING;
			GUIHideWindow("WinSetupMenu");
			GUIShowWindow("Network_Setup");
			  dir_hwnd = AWFindWinCtrlByName("Scan_result") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                          dir_hwnd = AWFindWinCtrlByName("ManuScan") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                         dir_hwnd = AWFindWinCtrlByName("Internet_Setting") ;
                         if(!AWIsVisibleWinControl(dir_hwnd))
                          {
                           AWShowWinControl(dir_hwnd,0);   
                           AWSetFocus(dir_hwnd) ;			
                          }
        SetMenuNetRssPara(0);
			break;
		case 1: //Google
			//func(Manul)
			//menu_index_process=ID_INTERNET_GOOGLE_SETTING;
			menu_index = ID_INTERNET_GOOGLE_SETTING;
			GUIHideWindow("WinSetupMenu");
			GUIShowWindow("Network_Setup");
			  dir_hwnd = AWFindWinCtrlByName("Scan_result") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                          dir_hwnd = AWFindWinCtrlByName("ManuScan") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                         dir_hwnd = AWFindWinCtrlByName("Internet_Setting") ;
                         if(!AWIsVisibleWinControl(dir_hwnd))
                          {
                           AWShowWinControl(dir_hwnd,0);   
                           AWSetFocus(dir_hwnd) ;			
                          }
            SetMenuNetRssPara(1);	 	       
			break;
		case 2://frame channel
#endif /* ! HAS_FRAMECHANNEL_ONLY */
			menu_index_process=ID_INTERNET_FRAME_CHNL_SETTING;
			menu_index = ID_INTERNET_FRAME_CHNL_SETTING;
			GUIHideWindow("WinSetupMenu");
			GUIShowWindow("Network_Setup");
			  dir_hwnd = AWFindWinCtrlByName("Scan_result") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                          dir_hwnd = AWFindWinCtrlByName("ManuScan") ;
                         if(AWIsVisibleWinControl(dir_hwnd))
                          {
                          AWHideWinControl(dir_hwnd);   
                          }
                         dir_hwnd = AWFindWinCtrlByName("Internet_Setting") ;
                         if(!AWIsVisibleWinControl(dir_hwnd))
                          {
                           AWShowWinControl(dir_hwnd,0);   
                           AWSetFocus(dir_hwnd) ;			
                          }
        SetMenuNetRssPara(2);
			break;
		default:
			break;
//			return 0;
	}
//	return 1;
}

#endif

static NetmenusetupLanguageSet()
{
    AWResourceUnregister((OSD_LANGUAGE_STRING >> 16)) ;
    switch(lanuage_set) {
        case LANGUAGE_CHINESE:
	#ifndef WISTAR_VERSION
        #ifdef BIG5
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgChinese_BIG5.res",MsgChinese_big5_mem);//add liu
	    #else
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgChinese.res",MsgChinese_mem);
        #endif
    #else
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgChinese_wistar.res",MsgChinese_wistar_mem);
    #endif
            break ;
        case LANGUAGE_ENGLISH:
    #ifndef WISTAR_VERSION
        #ifdef BIG5
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgEnglish_BIG5.res",MsgEnglish_big5_mem);
        #else
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgEnglish.res",MsgEnglish_mem);
        #endif
	#else
            AWResourceRegister((OSD_LANGUAGE_STRING >> 16), "/dev/flash/MsgEnglish_wistar.res",MsgEnglish_wistar_mem);
	#endif
            break ;
    }
}

void MuiltLanguageSwitch(PHWND hwnd,unsigned char option_id)
{	
	int i ;
	Setup_Menu[CurrentItemId].Option_id_saved = option_id;
	lanuage_set = option_id;
	SetLanguagePara(option_id);  // 1 -chinese;0-English
	NetmenusetupLanguageSet();
	for(i=0;i<ITEM_NUM_PER_PAGE;i++)
	{
		hwnd->draw_info[SETUP_BAR].draw_pos_y = (INT32S)SelectBarYPos[i];
		AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_BAR);
	}

	hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = (INT32S)SelectBarYPos[MENU_LANGUAGE_ITEM_ID];
	AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_SELECT_BAR);

	for(i=MENU_LANGUAGE_ITEM;i<AUTORUN_OPTION+1;i++){
		if(i==MENU_LANGUAGE_OPTION){
			AWSetForeground(14);
			AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, i);
			AWSetForeground(3);
		}
		else
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, i);
	}
	AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;		
}

void SlideDurAction(PHWND hwnd,unsigned char option_id)
{
	SetSlideDurPara(option_id);
}

void SlideModeAction(PHWND hwnd,unsigned char option_id)
{
	SetSlideModePara(option_id);
}

void MusicRepeatAction(PHWND hwnd,unsigned char option_id)
{
	SetMusicRepeatModePara(option_id);
}
void MovieRepeatAction(PHWND hwnd,unsigned char option_id)
{
	SetMovieRepeatModePara(option_id);
}
void DisplayModeAction(PHWND hwnd,unsigned char option_id)
{
	SetDisplayModePara(option_id);
	SetTVOutput();
}
char TV_Mode_Switch_Flag = 0;

void TVOutPutModeAction(PHWND hwnd,unsigned char option_id)
{
#ifdef WISTAR_VERSION
    switch(option_id)
    {
        case 0:
	        CurrentOsdSize = OsdSize480p;
	        break;
        case 1:
	        CurrentOsdSize = OsdSize576p;
	        break;
        case 2:
	        CurrentOsdSize = OsdSize480iCVBS;
	        break;
        case 3:
	        CurrentOsdSize = OsdSize576iCVBS;
	        break;
        case 4:
	        CurrentOsdSize = OsdSize720p;
	        break;
        default:
	        CurrentOsdSize = OsdSize480p;
	        break;
    }
#else
	CurrentOsdSize = option_id + 3;
#endif
#ifdef TV_MODE_1080P
	if(CurrentOsdSize == OsdSize720p)
	{
		 CurrentOsdSize = OsdSize1080p;
	}
#endif
	SetTVOutPutModePara(option_id);					
	ChangeOutputMode();
	SetTVOutput();
	TV_Mode_Switch_Flag = 1;
	GUIShowWindow(WinSetup_net_menu);     

}

void AutoRunAction(PHWND hwnd,unsigned char option_id)
{
#ifdef AUTO_PLAY
	SetAutoRunPara(option_id);
#ifdef RESUME_PLAY
    extern INT8U ResumeFunction;
    ResumeFunction = 1-option_id;
#endif
#endif
}

void SetVolumeUnmuteDefault()
{
	isMute = UNMUTE ;
	GPIO_MB_UNMUTE ;
	Volume_Value = 4 ;
	SetSoundLevelPara(Volume_Value);
	SetAC3CtrlReg(3, volume_level[Volume_Value]);
}

void DefaultAction(PHWND hwnd,unsigned char option_id)
{
	SetVolumeUnmuteDefault();
	
	SlideDurAction(hwnd,1);
	SlideModeAction(hwnd,9);
	MusicRepeatAction(hwnd,1);
	MovieRepeatAction(hwnd,1);
	DisplayModeAction(hwnd,0);
	AutoRunAction(hwnd,1);
	
#ifdef DEFAULT_LANGUAGE_ENGLISH
	Setup_Menu[MENU_LANGUAGE_ITEM_ID].Option_id = 0;
#else
	Setup_Menu[MENU_LANGUAGE_ITEM_ID].Option_id = 1;
#endif
	Setup_Menu[SLIDESHOW_DUR_ITEM_ID].Option_id = 1;
	Setup_Menu[SLIDESHOW_MODE_ITEM_ID].Option_id = 9;
	Setup_Menu[MUSIC_REPEAT_ITEM_ID].Option_id = 1;
	Setup_Menu[MOVIE_REPEAT_ITEM_ID].Option_id = 1;
	Setup_Menu[DISPLAY_MODE_ITEM_ID].Option_id = 0;
#ifndef SURPORT_TVM
#ifdef MALATA_VERSION
	Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 4;
#else
	Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 0;
#endif
#endif
	Setup_Menu[AUTORUN_ITEM_ID].Option_id = 1;//0 open 1 close
	for(int i=0; i<8; i++)
		Setup_Menu[i].Option_id_saved= Setup_Menu[i].Option_id;
	
	for (i=page_top_item; i<8; i++)
	{
		hwnd->draw_info[i+MENU_LANGUAGE_ITEM+8-page_top_item].draw_data = Setup_Menu[i].Option_draw_info.draw_data
		 																	+Setup_Menu[i].Option_id_saved;
	}
	
#ifdef DEFAULT_LANGUAGE_ENGLISH
	lanuage_set = LANGUAGE_ENGLISH;
	SetLanguagePara(LANGUAGE_ENGLISH);  // 1 -chinese;0-English
#else
	lanuage_set = LANGUAGE_CHINESE;
	SetLanguagePara(LANGUAGE_CHINESE);  // 1 -chinese;0-English
#endif
	NetmenusetupLanguageSet();
	
	for(i=0;i<ITEM_NUM_PER_PAGE;i++)
	{
		hwnd->draw_info[SETUP_BAR].draw_pos_y = (INT32S)SelectBarYPos[i];
		AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_BAR);
	}
	
	for(i=SETUP_BAR;i<24+1;i++){
		AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, i);
	}
	AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;	
#ifdef SURPORT_TVM 
#ifdef TV_MODE_1080P
	if(CurrentOsdSize!= OsdSize1080p){
		CurrentOsdSize = OsdSize1080p;
		TVOutPutModeAction(hwnd,OsdSize1080p-3);
	}
#else
	if(CurrentOsdSize!= OsdSize720p){
		CurrentOsdSize = OsdSize720p;
		TVOutPutModeAction(hwnd,OsdSize720p-3);
	}
#endif	
#else
#ifdef MALATA_VERSION
	if(CurrentOsdSize!= OsdSize480iCVBS){
		CurrentOsdSize = OsdSize480iCVBS;
		TVOutPutModeAction(hwnd,4);
    	SetTVOutPutModePara(4);
	}						
#elif defined WISTAR_VERSION
	if(CurrentOsdSize!= OsdSize480p){
		CurrentOsdSize = OsdSize480p;
		TVOutPutModeAction(hwnd,0);
        SetTVOutPutModePara(0);
	}	
#else
	if(CurrentOsdSize!= OsdSize480i){
		CurrentOsdSize = OsdSize480i;
		TVOutPutModeAction(hwnd,0);
        SetTVOutPutModePara(0);
	}						
#endif	
#endif

	
}

void RefreshSetupMenuPage(PHWND hwnd, _SETUP_MENU_ *SetupMenu, unsigned char item, unsigned char flag)
{
	unsigned char i;
	
	PHWND child_hwnd = NULL;
	unsigned char PreItemId;
	unsigned char ItemId;
	
	if (!(hwnd) && !(SetupMenu))
		return;
		
	if(SETUPITEM_NUM-ITEM_NUM_PER_PAGE>0)
	{
		for(i=0;i<ITEM_NUM_PER_PAGE;i++)
		{
			hwnd->draw_info[SETUP_BAR].draw_pos_y = (INT32S)SelectBarYPos[i];
			AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_BAR);
		}
		
		if(item == DEFAULT_ITEM_ID)
			hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR_DEFAULT;
		else
			hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR;
		
		if(flag)  //bottom
		{
			for (i=item-8+1; i<item + 1; i++)
			{
				hwnd->draw_info[i+MENU_LANGUAGE_ITEM-page_top_item].draw_data = SetupMenu[i].Item_draw_info.draw_data ;	
				
				hwnd->draw_info[i+MENU_LANGUAGE_ITEM+8-page_top_item].draw_data = SetupMenu[i].Option_draw_info.draw_data
																					+ SetupMenu[i].Option_id_saved;				
			}
			
			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[7];
			hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[SETUPITEM_NUM-1];
			
			for(i=SETUP_BAR;i<24+1;i++){
				AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, i);
			}
			AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;	
			
		}		
		else  // top
		{	
			for (i=item; i<item + 8; i++)
			{
				hwnd->draw_info[i+MENU_LANGUAGE_ITEM-page_top_item].draw_data = SetupMenu[i].Item_draw_info.draw_data ;	
				
				hwnd->draw_info[i+MENU_LANGUAGE_ITEM+8-page_top_item].draw_data = SetupMenu[i].Option_draw_info.draw_data
																					+ SetupMenu[i].Option_id_saved;				
			}
			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[0];
			hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[0];

			for(i=SETUP_SELECT_BAR;i<24+1;i++){
				if(i==MENU_LANGUAGE_OPTION){
					AWSetForeground(14);
					AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, i);
					AWSetForeground(3);
				}
				else if(i==SETUP_SELECT_BAR)
					AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, i);
				else 
					AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, i);
			}
			AWPostMessage(hwnd, WM_PAINT_FINISH, 0);
		}	
		
	}
	else

	{
		if(flag)
		{	
			hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR_DEFAULT;
			hwnd->draw_info[SETUP_BAR].draw_pos_y = SelectBarYPos[0];
			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[7];
			hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[7];
			PreItemId = 0;
			ItemId = 7;
		}
		else
		{	
			hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR;		
			hwnd->draw_info[SETUP_BAR].draw_pos_y = SelectBarYPos[7];
			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[0];
			hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[0];
			PreItemId = 7;
			ItemId = 0;
		}

			
			hwnd->draw_info[ItemId+MENU_LANGUAGE_ITEM+8].draw_data = (INT32U)(SetupMenu[ItemId].Option_draw_info.draw_data
																			+ SetupMenu[ItemId].Option_id_saved);	
			hwnd->draw_info[PreItemId+MENU_LANGUAGE_ITEM+8].draw_data =(INT32U)(SetupMenu[PreItemId].Option_draw_info.draw_data
																			+ SetupMenu[PreItemId].Option_id_saved);
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_BAR);
			AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_SELECT_BAR);	
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PROCESS_BAR);
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, SLIDE_BAR);
		
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PreItemId+MENU_LANGUAGE_ITEM);
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PreItemId+MENU_LANGUAGE_ITEM+8);
		
			AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId+MENU_LANGUAGE_ITEM);
			AWSetForeground(14);
			AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId+MENU_LANGUAGE_ITEM+8);
			AWSetForeground(3);
			
			AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;
			
			SetupMenu[PreItemId].Option_id = SetupMenu[PreItemId].Option_id_saved;

	}

}

void SwitchSetupMenuItem(PHWND hwnd, _SETUP_MENU_ *SetupMenu, unsigned char ItemId, unsigned char Updown)
{
	unsigned char PreItemId;
	
	PHWND child_hwnd = NULL;
	
	switch (Updown)
	{
		case UOP_UP:
			PreItemId = ItemId + 1;
			break;
		case UOP_DOWN:
			PreItemId = ItemId - 1;			
			break;
		default:
			break;
	}
	if(ItemId == DEFAULT_ITEM_ID)
		hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR_DEFAULT;
	else
		hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR;
		
	hwnd->draw_info[SETUP_BAR].draw_pos_y = SelectBarYPos[PreItemId-page_top_item];	
	hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[ItemId-page_top_item];
	
	hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[ItemId];
	
	hwnd->draw_info[ItemId-page_top_item+MENU_LANGUAGE_ITEM+8].draw_data = (INT32U)(SetupMenu[ItemId].Option_draw_info.draw_data
																+ SetupMenu[ItemId].Option_id_saved);	
	hwnd->draw_info[PreItemId-page_top_item+MENU_LANGUAGE_ITEM+8].draw_data =(INT32U)(SetupMenu[PreItemId].Option_draw_info.draw_data
																+ SetupMenu[PreItemId].Option_id_saved);

	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_BAR);
	AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_SELECT_BAR);	
	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PROCESS_BAR);
	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, SLIDE_BAR);

	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PreItemId-page_top_item+MENU_LANGUAGE_ITEM);
	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, PreItemId-page_top_item+MENU_LANGUAGE_ITEM+8);

	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId-page_top_item+MENU_LANGUAGE_ITEM);
	AWSetForeground(14);
	AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId-page_top_item+MENU_LANGUAGE_ITEM+8);
	AWSetForeground(3);
	
	AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;
	
	SetupMenu[PreItemId].Option_id = SetupMenu[PreItemId].Option_id_saved;
	
}

void SwitchSetupMenuOption(PHWND hwnd, _SETUP_MENU_ *SetupMenu, unsigned char ItemId, unsigned char OptionId)
{
	
	hwnd->draw_info[ItemId-page_top_item+MENU_LANGUAGE_ITEM+8].draw_data = (INT32U) (SetupMenu[ItemId].Option_draw_info.draw_data
																+SetupMenu[ItemId].Option_id);
	
	AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, SETUP_SELECT_BAR);
	AWPostMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId-page_top_item+MENU_LANGUAGE_ITEM);
	AWSetForeground(14);
	AWSendMessage(hwnd, WM_PAINT_DRAW_INFO, ItemId-page_top_item+MENU_LANGUAGE_ITEM+ 8);
	AWSetForeground(3);
	AWPostMessage(hwnd, WM_PAINT_FINISH, 0) ;
}
#ifdef ENABLE_NETWORK
u8_t net_entrance = FALSE;
#endif

INT32S WinSetupMenuShowOnKeyPress(PHWND hwnd, INT32S lpParam)
{
	INT32U *key_value = (INT32U *)lpParam; 	
	PHWND dir_hwnd = NULL;
#ifdef ENABLE_NETWORK 
	if(Show_Net_State)
		{
		if(*key_value==UOP_RESUME)
            		{
                    Show_Net_State=0;
//			bk_color=AWSetForeground(0);
			AWFillRectTxt(0,0,800,480); 
//			AWSetForeground(bk_color);
			RefreshSetupMenuPage(hwnd, Setup_Menu, CurrentMenuPage, 0);
			}
		}
	else
#endif		
	switch ((*key_value))
	{
		case UOP_UP:
		case UOP_DOWN:
			if ((*key_value) == UOP_UP)
				
			{	CurrentItemId--;
				if(CurrentItemId == 0xFF){
					page_bottom_item = SETUPITEM_NUM -1;
					page_top_item = page_bottom_item - 8+1;
					CurrentItemId = SETUPITEM_NUM -1;
					RefreshSetupMenuPage(hwnd, Setup_Menu, page_bottom_item, 1); // 1 bottom
					return 0;//evan:2007_10_11
			}
				else if(CurrentItemId < page_top_item){
					page_top_item--;
					page_bottom_item--;
					RefreshSetupMenuPage(hwnd, Setup_Menu, page_top_item, 0);// 0 top
					return 0;//evan:2007_10_11
				}
				else
				{
					SwitchSetupMenuItem(hwnd, Setup_Menu, CurrentItemId, UOP_UP);
				}
			}
			else
			{	
				CurrentItemId++;
				if (CurrentItemId == SETUPITEM_NUM)
				{
					page_top_item = 0;
					CurrentItemId  = 0;
					page_bottom_item = page_top_item + 7;
					RefreshSetupMenuPage(hwnd, Setup_Menu, page_top_item, 0);
					return 0;//evan:2007_10_11
				}
				else if(CurrentItemId > page_bottom_item){
					page_top_item++;
					page_bottom_item++;
					RefreshSetupMenuPage(hwnd, Setup_Menu, page_bottom_item, 1);
					return 0;  //evan:2007_10_11
				}
				else
				{
					SwitchSetupMenuItem(hwnd, Setup_Menu, CurrentItemId, UOP_DOWN);
				}
			}
			break;

		case UOP_LEFT:
		case UOP_RIGHT:
				if(CurrentItemId != DEFAULT_ITEM_ID ){
#ifdef ENABLE_NETWORK
//				if (CurrentItemId == MENU_NETWORK) 
//					break;
				if((CurrentItemId == MENU_NETWORK)||(CurrentItemId == MENU_RSS)) {
					
					if(!usbnet_device_plug)	//if usbnet device is not plugged in, do nothing				
					{
//						WARNNING("No usb net device!\n");
//						break;
					}	
					
				}
#endif

					if ((*key_value) == UOP_LEFT)
					{
						if (--Setup_Menu[CurrentItemId].Option_id == 0xFF)
						{
							Setup_Menu[CurrentItemId].Option_id = Setup_Menu[CurrentItemId].OptionNum-1;
						}
					}
					else
					{
						if (++Setup_Menu[CurrentItemId].Option_id >= Setup_Menu[CurrentItemId].OptionNum)
						{
							Setup_Menu[CurrentItemId].Option_id = 0;
						}
					}
					
						SwitchSetupMenuOption(hwnd, Setup_Menu, CurrentItemId, Setup_Menu[CurrentItemId].Option_id);
				}
			break;

		case UOP_ENTER:
			#ifdef ENABLE_NETWORK
			if((CurrentItemId == MENU_NETWORK)||(CurrentItemId == MENU_RSS)){
				if(!usbnet_device_plug)	//if usbnet device is not plugged in, do nothing				
				{
	//				WARNNING("No usb net device!\n");
	//				break;
				}				
				net_entrance = TRUE;	//net device is disabled
				}
				
#endif
			if (Setup_Menu[CurrentItemId].MenuProc){
				if(CurrentItemId == DEFAULT_ITEM_ID)
					Setup_Menu[CurrentItemId].MenuProc(hwnd,0);
				else if(Setup_Menu[CurrentItemId].Option_id != Setup_Menu[CurrentItemId].Option_id_saved)
				{
					Setup_Menu[CurrentItemId].Option_id_saved = Setup_Menu[CurrentItemId].Option_id;
					Setup_Menu[CurrentItemId].MenuProc(hwnd,Setup_Menu[CurrentItemId].Option_id_saved);
				}	
			}
			break;
//		case UOP_STOP:
		case UOP_RESUME:
		case UOP_HOME:
			GUIHideWindow(WinSetup_net_menu);
   			GUIShowWindow(WinDeviceSelect);
			break;
#ifndef SURPORT_TVM
		case UOP_NTSC_PAL:
#ifdef WISTAR_VERSION
            switch(CurrentOsdSize)
            {
                case OsdSize720p:
        	        CurrentOsdSize = OsdSize480p;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 0;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= 0;
    				SetTVOutPutModePara(0);
        	        break;
                case OsdSize480p:
        	        CurrentOsdSize = OsdSize576p;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 1;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= 1;
    				SetTVOutPutModePara(1);
        	        break;
                case OsdSize576p:
        	        CurrentOsdSize = OsdSize480iCVBS;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 2;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= 2;
    				SetTVOutPutModePara(2);
        	        break;
                case OsdSize480iCVBS:
        	        CurrentOsdSize = OsdSize576iCVBS;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 3;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= 3;
    				SetTVOutPutModePara(3);
        	        break;
                case OsdSize576iCVBS:
                default:
        	        CurrentOsdSize = OsdSize720p;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 4;
    				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= 4;
    				SetTVOutPutModePara(4);
        	        break;
            }
				TV_Mode_Switch_Flag	= 1;
				ChangeOutputMode();
				SetTVOutput();
				GUIShowWindow(WinSetup_net_menu);
#else					
				CurrentOsdSize++;
			#ifdef TV_MODE_720P  //OsdSizeTotal+1
			    #ifdef SUPPORT_VGA
				if(CurrentOsdSize == 11)
			    #else
				if(CurrentOsdSize == 10)
			    #endif
			#else
			    #ifdef SUPPORT_VGA
				if(CurrentOsdSize == 10)
			    #else
				if(CurrentOsdSize == 9)
			    #endif
			#endif
					CurrentOsdSize = 3;
				TV_Mode_Switch_Flag	= 1;
				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = CurrentOsdSize - 3;
				Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id_saved= CurrentOsdSize - 3 ;
				SetTVOutPutModePara(CurrentOsdSize - 3);
				ChangeOutputMode();
				SetTVOutput();
				GUIShowWindow(WinSetup_net_menu);
#endif		
			break;	
#endif
		default:
			break;
	}
	ClearPanelAction(key_value);
	return 0 ;
}

INT32S WinSetupMenuOnPaint(PHWND hwnd, INT32S lpParam)
{
	hwnd->pClass->ClassProc(hwnd, WM_PAINT, 0) ;
	Show_Net_State=0;
	AWSetForeground(14);
	if(CurrentItemId != DEFAULT_ITEM_ID)
		hwnd->pClass->ClassProc(hwnd, WM_PAINT_DRAW_INFO,CurrentItemId+MENU_LANGUAGE_ITEM+8-page_top_item);
	AWSetForeground(3);

	return 1;                             
}

INT32S WinSetupMenuOnShow(PHWND hwnd, INT32S lpParam)
{

		
	for (int i=page_top_item; i<page_top_item+ 8; i++)
	{
		hwnd->draw_info[i+MENU_LANGUAGE_ITEM-page_top_item].draw_data = Setup_Menu[i].Item_draw_info.draw_data ;	
		
		hwnd->draw_info[i+MENU_LANGUAGE_ITEM+8-page_top_item].draw_data = Setup_Menu[i].Option_draw_info.draw_data
																			+ Setup_Menu[i].Option_id_saved;
		Setup_Menu[i].Option_id = Setup_Menu[i].Option_id_saved;
	}
	if(CurrentItemId == DEFAULT_ITEM_ID )
		hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR_DEFAULT;
	else
		hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR;
				
	hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = SelectBarYPos[CurrentItemId-page_top_item];	
	hwnd->draw_info[SLIDE_BAR].draw_pos_y = SlideBarPos[CurrentItemId];
	#ifdef ENABLE_NETWORK
	net_entrance = FALSE;
#endif

	return 1 ;
	#if 0
	if(TV_Mode_Switch_Flag == 1){
		if(CurrentItemId != DEFAULT_ITEM_ID ){
			hwnd->draw_info[SETUP_BAR].draw_pos_y = (INT16U)SelectBarYPos[0];
			hwnd->draw_info[MENU_LANGUAGE_ITEM].draw_data = (INT32U)MENU_LANGUAGE;
			if(lanuage_set == LANGUAGE_CHINESE)
				hwnd->draw_info[MENU_LANGUAGE_OPTION].draw_data = (INT32U)LANGUAGE_CHINESE_STR;
			else									
				hwnd->draw_info[MENU_LANGUAGE_OPTION].draw_data = (INT32U)LANGUAGE_ENGLISH_STR;

			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = (INT16U)SelectBarYPos[CurrentItemId];
			hwnd->draw_info[CurrentItemId+MENU_LANGUAGE_ITEM-page_top_item].draw_data = Setup_Menu[CurrentItemId].Item_draw_info.draw_data; 
														
			hwnd->draw_info[CurrentItemId +MENU_LANGUAGE_ITEM+8-page_top_item].draw_data = Setup_Menu[CurrentItemId].Option_draw_info.draw_data
															+ Setup_Menu[CurrentItemId].Option_id_saved;

			hwnd->draw_info[SLIDE_BAR].draw_pos_y = (INT32S)SlideBarPos[CurrentItemId];				
		}
		
		else{
			hwnd->draw_info[SETUP_BAR].draw_pos_y = (INT16U)SelectBarYPos[MENU_LANGUAGE_ITEM_ID];
			hwnd->draw_info[MENU_LANGUAGE_ITEM].draw_data = (INT32U)MENU_LANGUAGE;
			if(lanuage_set == LANGUAGE_CHINESE)
					hwnd->draw_info[MENU_LANGUAGE_OPTION].draw_data = (INT32U)LANGUAGE_CHINESE_STR;
			else									
				hwnd->draw_info[MENU_LANGUAGE_OPTION].draw_data = (INT32U)LANGUAGE_ENGLISH_STR;
		
			hwnd->draw_info[SETUP_SELECT_BAR].draw_data = (INT32U)ICON_SETUP_SELECT_BAR_DEFAULT;
			hwnd->draw_info[SETUP_SELECT_BAR].draw_pos_y = (INT16U)SelectBarYPos[DEFAULT_ITEM_ID];			
			hwnd->draw_info[DEFAULT_ITEM_ID].draw_data = (INT32U)DEFAULT_STR;
			hwnd->draw_info[SLIDE_BAR].draw_pos_y = (INT32S)SlideBarPos[DEFAULT_ITEM_ID];	
		}
		
		TV_Mode_Switch_Flag = 0;
		
	}
	#endif
	
}


void DisplayMenuOptionFromEEPROM(PHWND hwnd)
{
	unsigned char i;
	
	for (i=0; i<8; i++)
	{
		hwnd->draw_info[i+MENU_LANGUAGE_ITEM+8].draw_data = Setup_Menu[i].Option_draw_info.draw_data
		 														+Setup_Menu[i].Option_id_saved;
	}
   
}
void GetStoreSetting(void)
{
    INT8U i;
#ifdef ENABLE_NETWORK
    INT8U value[8];
    value[0]=GetLanguagePara();
    value[1]=GetSlideDurPara();
    value[2]=GetSlideModePara();
    value[3]=GetMusicRepeatModePara();
    value[4]=GetMovieRepeatModePara();
    value[5]=GetDisplayModePara();
    value[6]=GetNetEnablePara();
    value[7]=GetMenuNetRssPara(); 
   switch(value[6])
   	{
   	case 0://auto
		Set_WiFi_Status(1);
		break;
	case 1://manul
		Set_WiFi_Status(1);		
		break;
	case 2://Disable
		Set_WiFi_Status(0);		
		break;
	default:
		value[6]=0;
		Set_WiFi_Status(1);
		break;
   	}
    for(i=0;i<8;i++)  
   	{
    if((value[i]>=0)&&(value[i]<Setup_Menu[i].OptionNum)) 		
        Setup_Menu[i].Item_id=value[i];    	
     else 
	    Setup_Menu[i].Item_id=0;
     }
	
     if(value[6]==2) {//disable
	Setup_Menu[MENU_NETWORK].Item_id = Setup_Menu[MENU_NETWORK].OptionNum;	
     	}

//	get_network_parameter();
#else    
    INT8U value[6];
    value[0]=GetLanguagePara();
    value[1]=GetSlideDurPara();
    value[2]=GetSlideModePara();
    value[3]=GetMusicRepeatModePara();
    value[4]=GetMovieRepeatModePara();
    value[5]=GetDisplayModePara();
    for(i=0;i<6;i++)
   	{
    if((value[i]>=0)&&(value[i]<Setup_Menu[i].OptionNum)) 
        Setup_Menu[i].Item_id=value[i];
    else 
	    Setup_Menu[i].Item_id=1;
     }
#endif

}

int SetupMenuDefaultPro(unsigned char itemnum)
{	//no need to reset time, just reset alarm
	SetLanguagePara(0);
	SetSlideDurPara(0);
	SetSlideModePara(9);
	SetMusicRepeatModePara(2);
	SetMovieRepeatModePara(2);
	SetDisplayModePara(0);	
	#ifdef ENABLE_NETWORK	
	SetNetEnablePara(0);
	SetMenuNetRssPara(0);
//	set_default_network_parameter();
	#endif		
	SetParaInit();
	CurrentMenuPage = 1;
	GetStoreSetting();
	GPIO_MB_UNMUTE;
	RefreshSetupMenuPage(AWFindWinCtrlByName("WinSetupMenu"), Setup_Menu, CurrentMenuPage, 0);	
	return 1;
}


void LoadDefaultSetting(void)
{

	//SetLanguagePara(0);
	//SetDisplayModePara(0);	
	if(!GetParaInit())
	{
#ifdef DEFAULT_LANGUAGE_ENGLISH
		SetLanguagePara(LANGUAGE_ENGLISH);  // 1 -chinese;0-English
#else
		SetLanguagePara(LANGUAGE_CHINESE);  // 1 -chinese;0-English
#endif
		SetSlideDurPara(1);
		SetSlideModePara(9);
		SetMusicRepeatModePara(1);
		SetMovieRepeatModePara(1);
		SetDisplayModePara(0);
#ifdef MALATA_VERSION	
		SetTVOutPutModePara(4);
#else
		SetTVOutPutModePara(0);
#endif
		SetAutoRunPara(1);
		SetTVOutput();
		#ifdef ENABLE_NETWORK	
	SetNetEnablePara(0);
	SetMenuNetRssPara(0);
//	set_default_network_parameter();
#endif		
		SetParaInit();
		isMute = UNMUTE ;
		GPIO_MB_UNMUTE ;
	}
//	SetMovieRepeatModePara(1);
}


void Init_Sys_Parameter(void)
{
	LoadDefaultSetting();
	
	Setup_Menu[MENU_LANGUAGE_ITEM_ID].Option_id = GetLanguagePara();
	Setup_Menu[SLIDESHOW_DUR_ITEM_ID].Option_id = GetSlideDurPara();
	Setup_Menu[SLIDESHOW_MODE_ITEM_ID].Option_id = GetSlideModePara();
	Setup_Menu[MUSIC_REPEAT_ITEM_ID].Option_id = GetMusicRepeatModePara();
	Setup_Menu[MOVIE_REPEAT_ITEM_ID].Option_id = GetMovieRepeatModePara();
	Setup_Menu[DISPLAY_MODE_ITEM_ID].Option_id = GetDisplayModePara();
#ifndef SURPORT_TVM
#ifdef MALATA_VERSION
	Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 4;
#else
	Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = GetTVOutPutModePara();
#endif
#endif
	Setup_Menu[AUTORUN_ITEM_ID].Option_id = GetAutoRunPara();
    if(Setup_Menu[AUTORUN_ITEM_ID].Option_id > 1)
        Setup_Menu[AUTORUN_ITEM_ID].Option_id = 1;
        
#ifndef	SURPORT_TVM
#ifdef SUPPORT_VGA
	if(Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id>=8)
#elif defined(TV_MODE_720P)||defined(TV_MODE_1080P)
#ifdef WISTAR_VERSION
	if(Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id>=5)
#else
	if(Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id>=7)
#endif
#else
	if(Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id>=6)
#endif
	 Setup_Menu[TV_SYSTEM_ITEM_ID].Option_id = 0;
#endif


#ifndef SURPORT_TVM
  	for(int i=0; i<8; i++)
#else
  	for(int i=0; i<7; i++)
#endif
		
		Setup_Menu[i].Option_id_saved= Setup_Menu[i].Option_id;
    
    lanuage_set = Setup_Menu[MENU_LANGUAGE_ITEM_ID].Option_id_saved;
    NetmenusetupLanguageSet();
	SetTVOutput();
#ifdef ENABLE_BLUETOOTH
	SetBtDefaultPinCode();
	InitBtLinkKey();
	GetBtLinkKey();
#endif 
}


INT32S WinSetupOnShow(PHWND hwnd, INT32S lpParam)
{
    osdsettpval(0,0xf);
    return 0 ;
}

void SwitchSlidePos()
{
	switch(CurrentOsdSize){
#ifndef SURPORT_TVM
		case OsdSize576i:
		case OsdSize576p:
		case OsdSize576iCVBS:	
			memcpy(SelectBarYPos,SelectBarYPos_576,sizeof(SelectBarYPos));
			memcpy(SlideBarPos,SlideBarPos_576,sizeof(SlideBarPos));
 		    break;
		
		case OsdSize480i:
		case OsdSize480p:
		case OsdSize480iCVBS:
    #ifdef SUPPORT_VGA					
		case OsdSizeVga:
    #endif		
			memcpy(SelectBarYPos,SelectBarYPos_480,sizeof(SelectBarYPos));
			memcpy(SlideBarPos,SlideBarPos_480,sizeof(SlideBarPos));
		    break;
#endif
	#ifdef TV_MODE_720P
		case OsdSize720p:
			memcpy(SelectBarYPos,SelectBarYPos_720,sizeof(SelectBarYPos));
			memcpy(SlideBarPos,SlideBarPos_720,sizeof(SlideBarPos));
    		break;
    #endif
	#ifdef TV_MODE_1080P
		case OsdSize1080p:
			memcpy(SelectBarYPos,SelectBarYPos_1080,sizeof(SelectBarYPos));
			memcpy(SlideBarPos,SlideBarPos_1080,sizeof(SlideBarPos));
    		break;
    #endif
	}
}

void ChangeOutputMode()
{
	PHWND dir_hwnd ;
	dir_hwnd = AWGetTopWindow(gpFocusWin);	
	AWHideWindow(dir_hwnd);
	ChangeTV_Type();
	CtrlNameConvert(CurrentOsdSize);
	funcPointerConvert(CurrentOsdSize);
	LoadNewIcon();
#ifdef SUPPORT_VGA
     if(CurrentOsdSize ==OsdSizeVga)
       AWSetWinStart(WinStart_x,WinStart_y);
     else
       AWSetWinStart(0,0);
#endif
	 
	SwitchSlidePos();
	AWCreateAllWindow();
	FileListInitData();
}

void AWCreateAllWindow() 
{
	(*fpCreateMenuLoadingWin)();
	(*fpCreateWinSetupMenu)();
	(*fpCreateMenuWinDeviceSelect)();
	(*fpCreateMenuWinPicInfoBar)();
	(*fpCreateMenuWinLogo)();
	(*fpCreateMenuWinFileTypeSelect)();
	(*fpCreateMenuWin15Pic)();
	(*fpCreateMenuWinFileList)();
	(*fpCreateMenuWinMoviePlayBack)();
	(*fpCreateMenuWinConfirm)();
	(*fpCreateMenuWinAviSub)();
	(*fpCreateMenuWinDebug)();
} 

const unsigned char* ICON_MOVIE_PREV_BACKGROUND;
const unsigned char* ICON_TOP_BOTTOM_BACKGROUND1;
const unsigned char* ICON_TOP_BOTTOM_BACKGROUND2;
const unsigned char* ICON_PROCESS_BAR;
const unsigned char* ICON_SETUP_TOP;
const unsigned char* ICON_SETUP_SELECT_BAR;
const unsigned char* ICON_SETUP_SELECT_BAR_DEFAULT;
const unsigned char* ICON_SETUP_BAR;
const unsigned char* ICON_SLIDE_BAR;
const unsigned char* ICON_FILE_FOCUS;
const unsigned char* ICON_FILE_LOSE;
const unsigned char* ICON_MOVIE_FOCUS;
const unsigned char* ICON_MOVIE_LOSE;
const unsigned char* ICON_MUSIC_FOCUS;
const unsigned char* ICON_MUSIC_LOSE;
const unsigned char* ICON_PHOTO_FOCUS;
const unsigned char* ICON_PHOTO_LOSE;
const unsigned char* ICON_TXT_FOCUS;
const unsigned char* ICON_TXT_LOSE;
const unsigned char* ICON_MOVIE_PREVIEW_ENABLE;
const unsigned char* ICON_SPEAKER;
const unsigned char* ICON_INFO_BACKGROUNG;
const unsigned char* ICON_FILELIST_DOWN;
const unsigned char* ICON_FILELIST_INFO_BLANK;
const unsigned char* ICON_FILELIST_LEFT;
const unsigned char* ICON_FILELIST_MUSIC_BACKGROUND;
const unsigned char* ICON_FILELIST_RIGHT;
const unsigned char* ICON_FILELIST_UP;
const unsigned char* ICON_FILE_FILE_TYPE_FOCUS;
const unsigned char* ICON_FILE_FILE_TYPE_LOSE;
const unsigned char* ICON_FILE_MOVIE_TYPE_FOCUS;
const unsigned char* ICON_FILE_MOVIE_TYPE_LOSE;
const unsigned char* ICON_FILE_MUSIC_TYPE_FOCUS;
const unsigned char* ICON_FILE_MUSIC_TYPE_LOSE;
const unsigned char* ICON_FILE_PHOTO_TYPE_FOCUS;
const unsigned char* ICON_FILE_PHOTO_TYPE_LOSE;
const unsigned char* ICON_FILE_TOP;
const unsigned char* ICON_MOVIE_TOP; 
const unsigned char* ICON_MUSIC_TOP;
const unsigned char* ICON_PHOTO_TOP;
const unsigned char* ICON_TXT_TOP;
const unsigned char* ICON_MUSIC_INFO_BLANK;


const unsigned char* ICON_FILELIST_BAR_FOCUS;
const unsigned char* ICON_FILELIST_BAR_LOSE;
const unsigned char* ICON_FILELIST_BAR_FOCUS_PICKED;
const unsigned char* ICON_FILELIST_BAR_LOSE_PICKED;
const unsigned char* ICON_MUSIC_PLAY_BAR;
const unsigned char* ICON_TIME_BACGROUND;
const unsigned char* ICON_COMBO;

const unsigned char* ICON_MINIBAR_TRANS;
const unsigned char* ICON_UNMUTE;


const unsigned char* ICON_MUTE;
const unsigned char* ICON_INFOBAR_STATUS140;
const unsigned char* ICON_ROTATE_90;
const unsigned char* ICON_ROTATE_180;
const unsigned char* ICON_ROTATE_270;
const unsigned char* ICON_ZOOMLEVEL_8;
const unsigned char* ICON_ZOOMLEVEL_16;
const unsigned char* ICON_INFOBAR_STATUS512;
const unsigned char* ICON_INFOBAR_STATUS1;
const unsigned char* ICON_INFOBAR_BACKGROUND;
const unsigned char* ICON_PREV_LOSE;
const unsigned char* ICON_PREV_FOCUS;
const unsigned char* ICON_PLAY_FOCUS;
const unsigned char* ICON_PLAY_LOSE;
const unsigned char* ICON_NEXT_LOSE;
const unsigned char* ICON_NEXT_FOCUS;
const unsigned char* ICON_ROTATE_LOSE;
const unsigned char* ICON_ROTATE_FOCUS;
const unsigned char* ICON_STOP_LOSE;
const unsigned char* ICON_STOP_FOCUS;
const unsigned char* ICON_ZOOM_LOSE;

const unsigned char* ICON_ZOOM_FOCUS;
const unsigned char* ICON_X;
const unsigned char* ICON_X2;
const unsigned char* ICON_X4;
const unsigned char* ICON_PAUSE_LOSE;
const unsigned char* ICON_PAUSE_FOCUS;
const unsigned char* ICON_PHOTO_BACKGROUND;
const unsigned char* ICON_PIC_FOCUS;
const unsigned char* ICON_PIC_LOSE;
const unsigned char* ICON_VOLUME_MUTE;
const unsigned char* ICON_MOVIE_INFOR;
const unsigned char* ICON_PHOTO_INFO_BACKROUNG;
const unsigned char* ICON_PAGE_BACKROUNG;
const unsigned char* ICON_VOLUME0;
const unsigned char* ICON_VOLUME1;
const unsigned char* ICON_VOLUME2;
const unsigned char* ICON_VOLUME3;
const unsigned char* ICON_VOLUME4;
const unsigned char* ICON_VOLUME5;
const unsigned char* ICON_VOLUME6;
const unsigned char* ICON_VOLUME7;
const unsigned char* ICON_VOLUME_BLANK;
const unsigned char* ICON_VOLUME_SPACE;
const unsigned char* ICON_INFO_PLAY;
const unsigned char* ICON_INFO_PAUSE;
const unsigned char* ICON_INFO_BLANK;
const unsigned char* ICON_INFO_FB;
const unsigned char* ICON_INFO_FF;
const unsigned char* ICON_INFOBAR_STOP_FOCUS;

const unsigned char* ICON_MUSIC_SPECTRUM_BK;
const unsigned char* ICON_PATH_BLANK;
const unsigned char* ICON_NO_FOCUS;
const unsigned char* ICON_YES_FOCUS;
const unsigned char* ICON_NO_LOSE;
const unsigned char* ICON_YES_LOSE;
const unsigned char* ICON_UPGRADE_BACKGROUND;
const unsigned char* ICON_UPGRADE_BLANK;
const unsigned char* ICON_UPGRADE_PERCENT_INFOBAR;

const unsigned char* ICON_COPYDEL_BIG;
const unsigned char* ICON_COPYDEL_BKG;
const unsigned char* ICON_COPYDEL_FINISHED;
const unsigned char* ICON_COPYDEL_FOCUS;
const unsigned char* ICON_COPYDEL_LOSE;
const unsigned char* ICON_COPYDEL_SMALL;
const unsigned char* ICON_COPYINGFILE1;
const unsigned char* ICON_COPYINGFILE2;
const unsigned char* ICON_COPYINGFILE_BLANK;
const unsigned char* ICON_60;

const unsigned char* ICON_MUSIC_PLAY_BAR_BK;
const unsigned char* ICON_2_MUSIC;
const unsigned char* ICON_4_MUSIC;
const unsigned char* ICON_8_MUSIC;
const unsigned char* ICON_MOVIE_BACKGROUND;
const unsigned char* ICON_INFOBAR_FB_FOCUS_PLBK;
const unsigned char* ICON_INFOBAR_FB_LOSE_PLBK;
const unsigned char* ICON_INFOBAR_FF_FOCUS_PLBK;
const unsigned char* ICON_INFOBAR_FF_LOSE_PLBK ;
const unsigned char* ICON_INFOBAR_STATUS512_PLBK;
const unsigned char* ICON_NEXT_FOCUS_PLBK;
const unsigned char* ICON_NEXT_LOSE_PLBK;
const unsigned char* ICON_PAUSE_FOCUS_PLBK;
const unsigned char* ICON_PAUSE_LOSE_PLBK;
const unsigned char* ICON_PLAY_FOCUS_PLBK;
const unsigned char* ICON_PLAY_LOSE_PLBK;
const unsigned char* ICON_PREV_FOCUS_PLBK;
const unsigned char* ICON_PREV_LOSE_PLBK;
const unsigned char* ICON_STOP_FOCUS_PLBK;
const unsigned char* ICON_STOP_LOSE_PLBK;
const unsigned char* ICON_SUB_FOCUS_PLBK;
const unsigned char* ICON_SUB_LOSE_PLBK;
const unsigned char* ICON_SUB_NO_PLBK;
const unsigned char* ICON_SUB_BLANK_PLBK;
const unsigned char* ICON_X1_PLBK;
const unsigned char* ICON_X2_PLBK;
const unsigned char* ICON_X3_PLBK;
const unsigned char* ICON_X4_PLBK;
const unsigned char* ICON_X5_PLBK;
const unsigned char* ICON_X_PLBK;
const unsigned char* ICON_ZOOM_FOCUS_PLBK;
const unsigned char* ICON_ZOOM_LOSE_PLBK;
const unsigned char* ICON_ZOOMLEVEL_PLBK;
const unsigned char* ICON_ZOOMLEVEL_1_PLBK;
const unsigned char* ICON_ZOOMLEVEL_2_PLBK;
const unsigned char* ICON_ZOOMLEVEL_3_PLBK;
const unsigned char* ICON_ZOOMLEVEL_4_PLBK;

const unsigned char* ICON_INFOBAR_STATUS120X32;
const unsigned char* ICON_INFOBAR_PLAYTIME_BACKGROUND_2;
const unsigned char* ICON_MUSIC_PROCESSBAR_BLANK;
const unsigned char* ICON_MUSIC_TIME_BLANK;
const unsigned char* ICON_CF_FOCUS;
const unsigned char* ICON_CF_LOSE;
const unsigned char* ICON_SD_FOCUS;
const unsigned char* ICON_SD_LOSE;
const unsigned char* ICON_USB_FOCUS;
const unsigned char* ICON_USB_LOSE;
const unsigned char* ICON_XD_LOSE;
const unsigned char* ICON_XD_FOCUS;
const unsigned char* ICON_MS_FOCUS;
const unsigned char* ICON_MS_LOSE;
const unsigned char* ICON_SETUP_FOCUS;
const unsigned char* ICON_SETUP_LOSE;
const unsigned char* ICON_DEVICEEMPTY;
const unsigned char* ICON_DEVICENAME_BCK;
const unsigned char* ICON_ARROW_EMPTY;
const unsigned char* ICON_LEFT_ARROW;
const unsigned char* ICON_RIGHT_ARROW;
const unsigned char* ICON_FILETYPE_NAME_BLANK;
const unsigned char* ICON_FILELISET_BAR_FOCUS_ROLLSTRING;
const unsigned char* ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING;
const unsigned char* ICON_UNKNOW_FOCUS;
const unsigned char* ICON_UNKNOW_LOSE;

const unsigned char* ICON_ARROW_BACKGROUND_DOWN;
const unsigned char* ICON_ARROW_BACKGROUND_UP;
const unsigned char* ICON_ARROW_BACKGROUND;
const unsigned char* ICON_ARROW_CDBKG;
const unsigned char* ICON_ARROW_DOWN;
const unsigned char* ICON_ARROW_UP;
const unsigned char* ICON_ARROW_DOWN_VIDEO;
const unsigned char* ICON_ARROW_UP_VIDEO;

const unsigned char* ICON_PREV_UNSUPPORT;
const unsigned char* ICON_UNSUPPORT_VIDEO_CONFIG ;
const unsigned char* ICON_TIP_BLANK;
const unsigned char* ICON_SCREEN_SAVE;
const unsigned char* ICON_PC_CONNECT;
void LoadNewIcon()
{
	switch(CurrentOsdSize){
#ifndef SURPORT_TVM
		case OsdSize576i:
		case OsdSize576p:
		case OsdSize480i:
		case OsdSize480p:
		case OsdSize480iCVBS:
		case OsdSize576iCVBS:
			ICON_MOVIE_PREV_BACKGROUND				=ICON_MOVIE_PREV_BACKGROUND_480;

			ICON_TOP_BOTTOM_BACKGROUND1             =ICON_TOP_BOTTOM_BACKGROUND1_480;
			ICON_TOP_BOTTOM_BACKGROUND2             =ICON_TOP_BOTTOM_BACKGROUND2_480;           			
			ICON_PROCESS_BAR                        =ICON_PROCESS_BAR_480;                     
			ICON_SETUP_TOP                          =ICON_SETUP_TOP_480;                       
			ICON_SETUP_SELECT_BAR                   =ICON_SETUP_SELECT_BAR_480;                
			ICON_SETUP_SELECT_BAR_DEFAULT           =ICON_SETUP_SELECT_BAR_DEFAULT_480;        
			ICON_SETUP_BAR                          =ICON_SETUP_BAR_480;                       
			ICON_SLIDE_BAR                          =ICON_SLIDE_BAR_480;                       
			ICON_FILE_FOCUS                         =ICON_FILE_FOCUS_480;                      
			ICON_FILE_LOSE                          =ICON_FILE_LOSE_480;                       
			ICON_MOVIE_FOCUS                        =ICON_MOVIE_FOCUS_480;                     
			ICON_MOVIE_LOSE                         =ICON_MOVIE_LOSE_480;                      
			ICON_MUSIC_FOCUS                        =ICON_MUSIC_FOCUS_480;                     
			ICON_MUSIC_LOSE                         =ICON_MUSIC_LOSE_480;                      
			ICON_PHOTO_FOCUS                        =ICON_PHOTO_FOCUS_480;                     
			ICON_PHOTO_LOSE                         =ICON_PHOTO_LOSE_480;	
#ifdef TXT_PLAYER			
			ICON_TXT_FOCUS                          =ICON_TXT_FOCUS_480;   
			ICON_TXT_LOSE                           =ICON_TXT_LOSE_480;
			ICON_TXT_TOP                           =ICON_TXT_TOP_480;
#endif			
			ICON_MOVIE_PREVIEW_ENABLE               =ICON_MOVIE_PREVIEW_ENABLE_480;           
			ICON_SPEAKER                            =ICON_SPEAKER_480;                         
			ICON_INFO_BACKGROUNG                    =ICON_INFO_BACKGROUNG_480;                 
			ICON_FILELIST_DOWN                      =ICON_FILELIST_DOWN_480;                   
			ICON_FILELIST_INFO_BLANK                =ICON_FILELIST_INFO_BLANK_480;             
			ICON_FILELIST_LEFT                      =ICON_FILELIST_LEFT_480;                   
			ICON_FILELIST_MUSIC_BACKGROUND          =ICON_FILELIST_MUSIC_BACKGROUND_480;       
			ICON_FILELIST_RIGHT                     =ICON_FILELIST_RIGHT_480;                  
			ICON_FILELIST_UP                        =ICON_FILELIST_UP_480;                     
			ICON_FILE_FILE_TYPE_FOCUS               =ICON_FILE_FILE_TYPE_FOCUS_480;            
			ICON_FILE_FILE_TYPE_LOSE                =ICON_FILE_FILE_TYPE_LOSE_480;             
			ICON_FILE_MOVIE_TYPE_FOCUS              =ICON_FILE_MOVIE_TYPE_FOCUS_480;           
			ICON_FILE_MOVIE_TYPE_LOSE               =ICON_FILE_MOVIE_TYPE_LOSE_480;            
			ICON_FILE_MUSIC_TYPE_FOCUS              =ICON_FILE_MUSIC_TYPE_FOCUS_480;           
			ICON_FILE_MUSIC_TYPE_LOSE               =ICON_FILE_MUSIC_TYPE_LOSE_480;            
			ICON_FILE_PHOTO_TYPE_FOCUS              =ICON_FILE_PHOTO_TYPE_FOCUS_480;           
			ICON_FILE_PHOTO_TYPE_LOSE               =ICON_FILE_PHOTO_TYPE_LOSE_480;            
			ICON_FILE_TOP                           =ICON_FILE_TOP_480;                        
			ICON_MOVIE_TOP                          =ICON_MOVIE_TOP_480;                       
			ICON_MUSIC_TOP                          =ICON_MUSIC_TOP_480;                       
			ICON_PHOTO_TOP                          =ICON_PHOTO_TOP_480;                       
			ICON_MUSIC_INFO_BLANK                   =ICON_MUSIC_INFO_BLANK_480;                
			ICON_FILELIST_BAR_FOCUS                 =ICON_FILELIST_BAR_FOCUS_480;              
			ICON_FILELIST_BAR_LOSE                  =ICON_FILELIST_BAR_LOSE_480;               
			ICON_FILELIST_BAR_FOCUS_PICKED          =ICON_FILELIST_BAR_FOCUS_PICKED_480;       
			ICON_FILELIST_BAR_LOSE_PICKED           =ICON_FILELIST_BAR_LOSE_PICKED_480;        
			ICON_MUSIC_PLAY_BAR                     =ICON_MUSIC_PLAY_BAR_480;                  
			ICON_TIME_BACGROUND                     =ICON_TIME_BACGROUND_480;                  
			ICON_COMBO                              =ICON_COMBO_480;                           
			ICON_MINIBAR_TRANS                      =ICON_MINIBAR_TRANS_480;                   
			ICON_UNMUTE                             =ICON_UNMUTE_480;                          
			ICON_MUTE                               =ICON_MUTE_480;                            
			ICON_INFOBAR_STATUS140                  =ICON_INFOBAR_STATUS140_480;               
			ICON_ROTATE_90                          =ICON_ROTATE_90_480;                       
			ICON_ROTATE_180                         =ICON_ROTATE_180_480;                      
			ICON_ROTATE_270                         =ICON_ROTATE_270_480;                      
			ICON_ZOOMLEVEL_8                        =ICON_ZOOMLEVEL_8_480;                     
			ICON_ZOOMLEVEL_16                       =ICON_ZOOMLEVEL_16_480;                    
			ICON_INFOBAR_STATUS512                  =ICON_INFOBAR_STATUS512_480;               
			ICON_INFOBAR_STATUS1                    =ICON_INFOBAR_STATUS1_480;                 
			ICON_INFOBAR_BACKGROUND                 =ICON_INFOBAR_BACKGROUND_480;              
			ICON_PREV_LOSE                          =ICON_PREV_LOSE_480;                       
			ICON_PREV_FOCUS                         =ICON_PREV_FOCUS_480;                      
			ICON_PLAY_FOCUS                         =ICON_PLAY_FOCUS_480;                      
			ICON_PLAY_LOSE                          =ICON_PLAY_LOSE_480;                       
			ICON_NEXT_LOSE                          =ICON_NEXT_LOSE_480;                       
			ICON_NEXT_FOCUS                         =ICON_NEXT_FOCUS_480;                      
			ICON_ROTATE_LOSE                        =ICON_ROTATE_LOSE_480;                     
			ICON_ROTATE_FOCUS                       =ICON_ROTATE_FOCUS_480;                    
			ICON_STOP_LOSE                          =ICON_STOP_LOSE_480;                       
			ICON_STOP_FOCUS                         =ICON_STOP_FOCUS_480;                      
			ICON_ZOOM_LOSE                          =ICON_ZOOM_LOSE_480;                       
			ICON_ZOOM_FOCUS                         =ICON_ZOOM_FOCUS_480;                      
			ICON_X                                  =ICON_X_480;                               
			ICON_X2                                 =ICON_X2_480;                              
			ICON_X4                                 =ICON_X4_480;                              
			ICON_PAUSE_LOSE                         =ICON_PAUSE_LOSE_480;                      
			ICON_PAUSE_FOCUS                        =ICON_PAUSE_FOCUS_480;                     
			ICON_PHOTO_BACKGROUND                   =ICON_PHOTO_BACKGROUND_480;                
			ICON_PIC_FOCUS                          =ICON_PIC_FOCUS_480;                       
			ICON_PIC_LOSE                           =ICON_PIC_LOSE_480;                        
			ICON_VOLUME_MUTE                        =ICON_VOLUME_MUTE_480;                     
			ICON_MOVIE_INFOR                        =ICON_MOVIE_INFOR_480;                     
			ICON_PHOTO_INFO_BACKROUNG               =ICON_PHOTO_INFO_BACKROUNG_480;            
			ICON_PAGE_BACKROUNG                     =ICON_PAGE_BACKROUNG_480;                  
			ICON_VOLUME0                            =ICON_VOLUME0_480;                         
			ICON_VOLUME1                            =ICON_VOLUME1_480;                         
			ICON_VOLUME2                            =ICON_VOLUME2_480;                         
			ICON_VOLUME3                            =ICON_VOLUME3_480;                         
			ICON_VOLUME4                            =ICON_VOLUME4_480;                         
			ICON_VOLUME5                            =ICON_VOLUME5_480;                         
			ICON_VOLUME6                            =ICON_VOLUME6_480;                         
			ICON_VOLUME7                            =ICON_VOLUME7_480;                         
			ICON_VOLUME_BLANK                       =ICON_VOLUME_BLANK_480;                    
			ICON_VOLUME_SPACE                       =ICON_VOLUME_SPACE_480;                    
			ICON_INFO_PLAY                          =ICON_INFO_PLAY_480;                       
			ICON_INFO_PAUSE                         =ICON_INFO_PAUSE_480;                      
			ICON_INFO_BLANK                         =ICON_INFO_BLANK_480;                      
			ICON_INFO_FB                            =ICON_INFO_FB_480;                         
			ICON_INFO_FF                            =ICON_INFO_FF_480;                         
			ICON_MUSIC_SPECTRUM_BK                  =ICON_MUSIC_SPECTRUM_BK_480;               
			ICON_PATH_BLANK                         =ICON_PATH_BLANK_480;                      
			ICON_NO_FOCUS                           =ICON_NO_FOCUS_480;                        
			ICON_YES_FOCUS                          =ICON_YES_FOCUS_480;                       
			ICON_NO_LOSE                            =ICON_NO_LOSE_480;                         
			ICON_YES_LOSE                           =ICON_YES_LOSE_480;                        
			ICON_UPGRADE_BACKGROUND                 =ICON_UPGRADE_BACKGROUND_480;              
			ICON_UPGRADE_BLANK                      =ICON_UPGRADE_BLANK_480;                   
			ICON_UPGRADE_PERCENT_INFOBAR            =ICON_UPGRADE_PERCENT_INFOBAR_480;         
			ICON_COPYDEL_BIG                        =ICON_COPYDEL_BIG_480;                     
			ICON_COPYDEL_BKG                        =ICON_COPYDEL_BKG_480;                     
			ICON_COPYDEL_FINISHED                   =ICON_COPYDEL_FINISHED_480;                
			ICON_COPYDEL_FOCUS                      =ICON_COPYDEL_FOCUS_480;                   
			ICON_COPYDEL_LOSE                       =ICON_COPYDEL_LOSE_480;                    
			ICON_COPYDEL_SMALL                      =ICON_COPYDEL_SMALL_480;                   
			ICON_COPYINGFILE1                       =ICON_COPYINGFILE1_480;                    
			ICON_COPYINGFILE2                       =ICON_COPYINGFILE2_480;                    
			ICON_60                                 =ICON_60_480;                              
			
			ICON_MUSIC_PLAY_BAR_BK                  =ICON_MUSIC_PLAY_BAR_BK_480;               
			ICON_2_MUSIC                            =ICON_2_MUSIC_480;                         
			ICON_4_MUSIC                            =ICON_4_MUSIC_480;                         
			ICON_8_MUSIC                            =ICON_8_MUSIC_480;                         
			ICON_INFOBAR_FB_FOCUS_PLBK              =ICON_INFOBAR_FB_FOCUS_PLBK_480;           
			ICON_INFOBAR_FB_LOSE_PLBK               =ICON_INFOBAR_FB_LOSE_PLBK_480;            
			ICON_INFOBAR_FF_FOCUS_PLBK              =ICON_INFOBAR_FF_FOCUS_PLBK_480;           
			ICON_INFOBAR_FF_LOSE_PLBK               =ICON_INFOBAR_FF_LOSE_PLBK_480;         
			ICON_INFOBAR_STATUS512_PLBK             =ICON_INFOBAR_STATUS512_PLBK_480;          
			ICON_NEXT_FOCUS_PLBK                    =ICON_NEXT_FOCUS_PLBK_480;                 
			ICON_NEXT_LOSE_PLBK                     =ICON_NEXT_LOSE_PLBK_480;                  
			ICON_PAUSE_FOCUS_PLBK                   =ICON_PAUSE_FOCUS_PLBK_480;                
			ICON_PAUSE_LOSE_PLBK                    =ICON_PAUSE_LOSE_PLBK_480;                 
			ICON_PLAY_FOCUS_PLBK                    =ICON_PLAY_FOCUS_PLBK_480;                 
			ICON_PLAY_LOSE_PLBK                     =ICON_PLAY_LOSE_PLBK_480;                  
			ICON_PREV_FOCUS_PLBK                    =ICON_PREV_FOCUS_PLBK_480;                 
			ICON_PREV_LOSE_PLBK                     =ICON_PREV_LOSE_PLBK_480;                  
			ICON_STOP_FOCUS_PLBK                    =ICON_STOP_FOCUS_PLBK_480;                 
			ICON_STOP_LOSE_PLBK                     =ICON_STOP_LOSE_PLBK_480;                  
			ICON_SUB_FOCUS_PLBK                    =ICON_SUB_FOCUS_PLBK_480;                 
			ICON_SUB_LOSE_PLBK                     =ICON_SUB_LOSE_PLBK_480;        
			ICON_SUB_NO_PLBK				=ICON_SUB_NO_PLBK_480;
			ICON_SUB_BLANK_PLBK			=ICON_SUB_BLANK_PLBK_480;
			ICON_X1_PLBK                            =ICON_X1_PLBK_480;                         
			ICON_X2_PLBK                            =ICON_X2_PLBK_480;                         
			ICON_X3_PLBK                            =ICON_X3_PLBK_480;                         
			ICON_X4_PLBK                            =ICON_X4_PLBK_480;                         
			ICON_X5_PLBK                            =ICON_X5_PLBK_480;                         
			ICON_X_PLBK                             =ICON_X_PLBK_480;                          
			ICON_ZOOM_FOCUS_PLBK                    =ICON_ZOOM_FOCUS_PLBK_480;                 
			ICON_ZOOM_LOSE_PLBK                     =ICON_ZOOM_LOSE_PLBK_480;                  
			ICON_ZOOMLEVEL_PLBK                     =ICON_ZOOMLEVEL_PLBK_480;                  
			ICON_ZOOMLEVEL_1_PLBK                   =ICON_ZOOMLEVEL_1_PLBK_480;                
			ICON_ZOOMLEVEL_2_PLBK                   =ICON_ZOOMLEVEL_2_PLBK_480;                
			ICON_ZOOMLEVEL_3_PLBK                   =ICON_ZOOMLEVEL_3_PLBK_480;                
			ICON_ZOOMLEVEL_4_PLBK                   =ICON_ZOOMLEVEL_4_PLBK_480;                
			ICON_INFOBAR_STATUS120X32               =ICON_INFOBAR_STATUS120X32_480;            
			ICON_INFOBAR_PLAYTIME_BACKGROUND_2      =ICON_INFOBAR_PLAYTIME_BACKGROUND_2_480;   
			ICON_MUSIC_PROCESSBAR_BLANK             =ICON_MUSIC_PROCESSBAR_BLANK_480;          
			ICON_MUSIC_TIME_BLANK                   =ICON_MUSIC_TIME_BLANK_480;                
			ICON_CF_FOCUS                           =ICON_CF_FOCUS_480;                        
			ICON_CF_LOSE                            =ICON_CF_LOSE_480;                         
			ICON_SD_FOCUS                           =ICON_SD_FOCUS_480;                        
			ICON_SD_LOSE                            =ICON_SD_LOSE_480;                         
			ICON_USB_FOCUS                          =ICON_USB_FOCUS_480;                       
			ICON_USB_LOSE                           =ICON_USB_LOSE_480;                        
			ICON_XD_LOSE                            =ICON_XD_LOSE_480;                         
			ICON_XD_FOCUS                           =ICON_XD_FOCUS_480;                        
			ICON_MS_FOCUS                           =ICON_MS_FOCUS_480;                        
			ICON_MS_LOSE                            =ICON_MS_LOSE_480;                         
			ICON_SETUP_FOCUS                        =ICON_SETUP_FOCUS_480;                     
			ICON_SETUP_LOSE                         =ICON_SETUP_LOSE_480;                      
			ICON_DEVICEEMPTY                        =ICON_DEVICEEMPTY_480;                     
			ICON_DEVICENAME_BCK                     =ICON_DEVICENAME_BCK_480;                  
			ICON_ARROW_EMPTY                        =ICON_ARROW_EMPTY_480;                     
			ICON_LEFT_ARROW                         =ICON_LEFT_ARROW_480;                      
			ICON_RIGHT_ARROW                        =ICON_RIGHT_ARROW_480;                     
			ICON_FILETYPE_NAME_BLANK                =ICON_FILETYPE_NAME_BLANK_480;             
			ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING     	=ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING_480;  
			ICON_UNKNOW_FOCUS                       =ICON_UNKNOW_FOCUS_480;                    
			ICON_UNKNOW_LOSE                        =ICON_UNKNOW_LOSE_480;     
			ICON_ARROW_BACKGROUND_DOWN				=ICON_ARROW_BACKGROUND_DOWN_480;
			ICON_ARROW_BACKGROUND_UP				=ICON_ARROW_BACKGROUND_UP_480;
			ICON_ARROW_BACKGROUND					=ICON_ARROW_BACKGROUND_480;
			ICON_ARROW_CDBKG						=ICON_ARROW_CDBKG_480;
			ICON_ARROW_DOWN							=ICON_ARROW_DOWN_480;
			ICON_ARROW_UP							=ICON_ARROW_UP_480;
			ICON_ARROW_DOWN_VIDEO					=ICON_ARROW_DOWN_VIDEO_480;
			ICON_ARROW_UP_VIDEO						=ICON_ARROW_UP_VIDEO_480;
			ICON_PREV_UNSUPPORT						=ICON_PREV_UNSUPPORT_480; 
			ICON_UNSUPPORT_VIDEO_CONFIG				=ICON_UNSUPPORT_VIDEO_CONFIG_480 ;
			ICON_TIP_BLANK							=ICON_TIP_BLANK_480;
			ICON_SCREEN_SAVE                             =ICON_SCREEN_SAVE_480P;
			ICON_PC_CONNECT							=ICON_PC_CONNECT_480;
			break;
#endif

#ifdef SUPPORT_VGA
case OsdSizeVga:
			ICON_MOVIE_PREV_BACKGROUND				=ICON_MOVIE_PREV_BACKGROUND_480;

			ICON_TOP_BOTTOM_BACKGROUND1             =ICON_TOP_BOTTOM_BACKGROUND1_480;
			ICON_TOP_BOTTOM_BACKGROUND2             =ICON_TOP_BOTTOM_BACKGROUND2_480;           			
			ICON_PROCESS_BAR                        =ICON_PROCESS_BAR_480;                     
			ICON_SETUP_TOP                          =ICON_SETUP_TOP_480;                       
			ICON_SETUP_SELECT_BAR                   =ICON_SETUP_SELECT_BAR_480;                
			ICON_SETUP_SELECT_BAR_DEFAULT           =ICON_SETUP_SELECT_BAR_DEFAULT_480;        
			ICON_SETUP_BAR                          =ICON_SETUP_BAR_480;                       
			ICON_SLIDE_BAR                          =ICON_SLIDE_BAR_480;                       
			ICON_FILE_FOCUS                         =ICON_FILE_FOCUS_480;                      
			ICON_FILE_LOSE                          =ICON_FILE_LOSE_480;                       
			ICON_MOVIE_FOCUS                        =ICON_MOVIE_FOCUS_480;                     
			ICON_MOVIE_LOSE                         =ICON_MOVIE_LOSE_480;                      
			ICON_MUSIC_FOCUS                        =ICON_MUSIC_FOCUS_480;                     
			ICON_MUSIC_LOSE                         =ICON_MUSIC_LOSE_480;                      
			ICON_PHOTO_FOCUS                        =ICON_PHOTO_FOCUS_480;                     
			ICON_PHOTO_LOSE                         =ICON_PHOTO_LOSE_480; 
#ifdef TXT_PLAYER			
			ICON_TXT_FOCUS                          =ICON_TXT_FOCUS_480;                     
			ICON_TXT_LOSE                           =ICON_TXT_LOSE_480; 
			ICON_TXT_TOP                           =ICON_TXT_TOP_480; 
#endif			
			
			ICON_MOVIE_PREVIEW_ENABLE               =ICON_MOVIE_PREVIEW_ENABLE_480;            
			ICON_SPEAKER                            =ICON_SPEAKER_480;                         
			ICON_INFO_BACKGROUNG                    =ICON_INFO_BACKGROUNG_480;                 
			ICON_FILELIST_DOWN                      =ICON_FILELIST_DOWN_480;                   
			ICON_FILELIST_INFO_BLANK                =ICON_FILELIST_INFO_BLANK_480;             
			ICON_FILELIST_LEFT                      =ICON_FILELIST_LEFT_480;                   
			ICON_FILELIST_MUSIC_BACKGROUND          =ICON_FILELIST_MUSIC_BACKGROUND_480;       
			ICON_FILELIST_RIGHT                     =ICON_FILELIST_RIGHT_480;                  
			ICON_FILELIST_UP                        =ICON_FILELIST_UP_480;                     
			ICON_FILE_FILE_TYPE_FOCUS               =ICON_FILE_FILE_TYPE_FOCUS_480;            
			ICON_FILE_FILE_TYPE_LOSE                =ICON_FILE_FILE_TYPE_LOSE_480;             
			ICON_FILE_MOVIE_TYPE_FOCUS              =ICON_FILE_MOVIE_TYPE_FOCUS_480;           
			ICON_FILE_MOVIE_TYPE_LOSE               =ICON_FILE_MOVIE_TYPE_LOSE_480;            
			ICON_FILE_MUSIC_TYPE_FOCUS              =ICON_FILE_MUSIC_TYPE_FOCUS_480;           
			ICON_FILE_MUSIC_TYPE_LOSE               =ICON_FILE_MUSIC_TYPE_LOSE_480;            
			ICON_FILE_PHOTO_TYPE_FOCUS              =ICON_FILE_PHOTO_TYPE_FOCUS_480;           
			ICON_FILE_PHOTO_TYPE_LOSE               =ICON_FILE_PHOTO_TYPE_LOSE_480;            
			ICON_FILE_TOP                           =ICON_FILE_TOP_480;                        
			ICON_MOVIE_TOP                          =ICON_MOVIE_TOP_480;                       
			ICON_MUSIC_TOP                          =ICON_MUSIC_TOP_480;                       
			ICON_PHOTO_TOP                          =ICON_PHOTO_TOP_480;                       
			ICON_MUSIC_INFO_BLANK                   =ICON_MUSIC_INFO_BLANK_480;                
			ICON_FILELIST_BAR_FOCUS                 =ICON_FILELIST_BAR_FOCUS_480;              
			ICON_FILELIST_BAR_LOSE                  =ICON_FILELIST_BAR_LOSE_480;               
			ICON_FILELIST_BAR_FOCUS_PICKED          =ICON_FILELIST_BAR_FOCUS_PICKED_480;       
			ICON_FILELIST_BAR_LOSE_PICKED           =ICON_FILELIST_BAR_LOSE_PICKED_480;        
			ICON_MUSIC_PLAY_BAR                     =ICON_MUSIC_PLAY_BAR_480;                  
			ICON_TIME_BACGROUND                     =ICON_TIME_BACGROUND_480;                  
			ICON_COMBO                              =ICON_COMBO_480;                           
			ICON_MINIBAR_TRANS                      =ICON_MINIBAR_TRANS_480;                   
			ICON_UNMUTE                             =ICON_UNMUTE_480;                          
			ICON_MUTE                               =ICON_MUTE_480;                            
			ICON_INFOBAR_STATUS140                  =ICON_INFOBAR_STATUS140_480;               
			ICON_ROTATE_90                          =ICON_ROTATE_90_480;                       
			ICON_ROTATE_180                         =ICON_ROTATE_180_480;                      
			ICON_ROTATE_270                         =ICON_ROTATE_270_480;                      
			ICON_ZOOMLEVEL_8                        =ICON_ZOOMLEVEL_8_480;                     
			ICON_ZOOMLEVEL_16                       =ICON_ZOOMLEVEL_16_480;                    
			ICON_INFOBAR_STATUS512                  =ICON_INFOBAR_STATUS512_480;               
			ICON_INFOBAR_STATUS1                    =ICON_INFOBAR_STATUS1_480;                 
			ICON_INFOBAR_BACKGROUND                 =ICON_INFOBAR_BACKGROUND_480;              
			ICON_PREV_LOSE                          =ICON_PREV_LOSE_480;                       
			ICON_PREV_FOCUS                         =ICON_PREV_FOCUS_480;                      
			ICON_PLAY_FOCUS                         =ICON_PLAY_FOCUS_480;                      
			ICON_PLAY_LOSE                          =ICON_PLAY_LOSE_480;                       
			ICON_NEXT_LOSE                          =ICON_NEXT_LOSE_480;                       
			ICON_NEXT_FOCUS                         =ICON_NEXT_FOCUS_480;                      
			ICON_ROTATE_LOSE                        =ICON_ROTATE_LOSE_480;                     
			ICON_ROTATE_FOCUS                       =ICON_ROTATE_FOCUS_480;                    
			ICON_STOP_LOSE                          =ICON_STOP_LOSE_480;                       
			ICON_STOP_FOCUS                         =ICON_STOP_FOCUS_480;                      
			ICON_ZOOM_LOSE                          =ICON_ZOOM_LOSE_480;                       
			ICON_ZOOM_FOCUS                         =ICON_ZOOM_FOCUS_480;                      
			ICON_X                                  =ICON_X_480;                               
			ICON_X2                                 =ICON_X2_480;                              
			ICON_X4                                 =ICON_X4_480;                              
			ICON_PAUSE_LOSE                         =ICON_PAUSE_LOSE_480;                      
			ICON_PAUSE_FOCUS                        =ICON_PAUSE_FOCUS_480;                     
			ICON_PHOTO_BACKGROUND                   =ICON_PHOTO_BACKGROUND_XGA;                
			ICON_PIC_FOCUS                          =ICON_PIC_FOCUS_480;                       
			ICON_PIC_LOSE                           =ICON_PIC_LOSE_480;                        
			ICON_VOLUME_MUTE                        =ICON_VOLUME_MUTE_480;                     
			ICON_MOVIE_INFOR                        =ICON_MOVIE_INFOR_480;                     
			ICON_PHOTO_INFO_BACKROUNG               =ICON_PHOTO_INFO_BACKROUNG_480;            
			ICON_PAGE_BACKROUNG                     =ICON_PAGE_BACKROUNG_480;                  
			ICON_VOLUME0                            =ICON_VOLUME0_480;                         
			ICON_VOLUME1                            =ICON_VOLUME1_480;                         
			ICON_VOLUME2                            =ICON_VOLUME2_480;                         
			ICON_VOLUME3                            =ICON_VOLUME3_480;                         
			ICON_VOLUME4                            =ICON_VOLUME4_480;                         
			ICON_VOLUME5                            =ICON_VOLUME5_480;                         
			ICON_VOLUME6                            =ICON_VOLUME6_480;                         
			ICON_VOLUME7                            =ICON_VOLUME7_480;                         
			ICON_VOLUME_BLANK                       =ICON_VOLUME_BLANK_480;                    
			ICON_VOLUME_SPACE                       =ICON_VOLUME_SPACE_480;                    
			ICON_INFO_PLAY                          =ICON_INFO_PLAY_480;                       
			ICON_INFO_PAUSE                         =ICON_INFO_PAUSE_480;                      
			ICON_INFO_BLANK                         =ICON_INFO_BLANK_480;                      
			ICON_INFO_FB                            =ICON_INFO_FB_480;                         
			ICON_INFO_FF                            =ICON_INFO_FF_480;                         
			ICON_MUSIC_SPECTRUM_BK                  =ICON_MUSIC_SPECTRUM_BK_480;               
			ICON_PATH_BLANK                         =ICON_PATH_BLANK_480;                      
			ICON_NO_FOCUS                           =ICON_NO_FOCUS_480;                        
			ICON_YES_FOCUS                          =ICON_YES_FOCUS_480;                       
			ICON_NO_LOSE                            =ICON_NO_LOSE_480;                         
			ICON_YES_LOSE                           =ICON_YES_LOSE_480;                        
			ICON_UPGRADE_BACKGROUND                 =ICON_UPGRADE_BACKGROUND_480;              
			ICON_UPGRADE_BLANK                      =ICON_UPGRADE_BLANK_480;                   
			ICON_UPGRADE_PERCENT_INFOBAR            =ICON_UPGRADE_PERCENT_INFOBAR_480;         
			ICON_COPYDEL_BIG                        =ICON_COPYDEL_BIG_480;                     
			ICON_COPYDEL_BKG                        =ICON_COPYDEL_BKG_480;                     
			ICON_COPYDEL_FINISHED                   =ICON_COPYDEL_FINISHED_480;                
			ICON_COPYDEL_FOCUS                      =ICON_COPYDEL_FOCUS_480;                   
			ICON_COPYDEL_LOSE                       =ICON_COPYDEL_LOSE_480;                    
			ICON_COPYDEL_SMALL                      =ICON_COPYDEL_SMALL_480;                   
			ICON_COPYINGFILE1                       =ICON_COPYINGFILE1_480;                    
			ICON_COPYINGFILE2                       =ICON_COPYINGFILE2_480;                    
			ICON_60                                 =ICON_60_480;                              
			
			ICON_MUSIC_PLAY_BAR_BK                  =ICON_MUSIC_PLAY_BAR_BK_480;               
			ICON_2_MUSIC                            =ICON_2_MUSIC_480;                         
			ICON_4_MUSIC                            =ICON_4_MUSIC_480;                         
			ICON_8_MUSIC                            =ICON_8_MUSIC_480;                         
			ICON_INFOBAR_FB_FOCUS_PLBK              =ICON_INFOBAR_FB_FOCUS_PLBK_480;           
			ICON_INFOBAR_FB_LOSE_PLBK               =ICON_INFOBAR_FB_LOSE_PLBK_480;            
			ICON_INFOBAR_FF_FOCUS_PLBK              =ICON_INFOBAR_FF_FOCUS_PLBK_480;           
			ICON_INFOBAR_FF_LOSE_PLBK               =ICON_INFOBAR_FF_LOSE_PLBK_480;         
			ICON_INFOBAR_STATUS512_PLBK             =ICON_INFOBAR_STATUS512_PLBK_480;          
			ICON_NEXT_FOCUS_PLBK                    =ICON_NEXT_FOCUS_PLBK_480;                 
			ICON_NEXT_LOSE_PLBK                     =ICON_NEXT_LOSE_PLBK_480;                  
			ICON_PAUSE_FOCUS_PLBK                   =ICON_PAUSE_FOCUS_PLBK_480;                
			ICON_PAUSE_LOSE_PLBK                    =ICON_PAUSE_LOSE_PLBK_480;                 
			ICON_PLAY_FOCUS_PLBK                    =ICON_PLAY_FOCUS_PLBK_480;                 
			ICON_PLAY_LOSE_PLBK                     =ICON_PLAY_LOSE_PLBK_480;                  
			ICON_PREV_FOCUS_PLBK                    =ICON_PREV_FOCUS_PLBK_480;                 
			ICON_PREV_LOSE_PLBK                     =ICON_PREV_LOSE_PLBK_480;                  
			ICON_STOP_FOCUS_PLBK                    =ICON_STOP_FOCUS_PLBK_480;                 
			ICON_STOP_LOSE_PLBK                     =ICON_STOP_LOSE_PLBK_480;                  
			ICON_SUB_FOCUS_PLBK                    =ICON_SUB_FOCUS_PLBK_480;                 
			ICON_SUB_LOSE_PLBK                     =ICON_SUB_LOSE_PLBK_480;        
			ICON_SUB_NO_PLBK				=ICON_SUB_NO_PLBK_480;
			ICON_SUB_BLANK_PLBK			=ICON_SUB_BLANK_PLBK_480;
			ICON_X1_PLBK                            =ICON_X1_PLBK_480;                         
			ICON_X2_PLBK                            =ICON_X2_PLBK_480;                         
			ICON_X3_PLBK                            =ICON_X3_PLBK_480;                         
			ICON_X4_PLBK                            =ICON_X4_PLBK_480;                         
			ICON_X5_PLBK                            =ICON_X5_PLBK_480;                         
			ICON_X_PLBK                             =ICON_X_PLBK_480;                          
			ICON_ZOOM_FOCUS_PLBK                    =ICON_ZOOM_FOCUS_PLBK_480;                 
			ICON_ZOOM_LOSE_PLBK                     =ICON_ZOOM_LOSE_PLBK_480;                  
			ICON_ZOOMLEVEL_PLBK                     =ICON_ZOOMLEVEL_PLBK_480;                  
			ICON_ZOOMLEVEL_1_PLBK                   =ICON_ZOOMLEVEL_1_PLBK_480;                
			ICON_ZOOMLEVEL_2_PLBK                   =ICON_ZOOMLEVEL_2_PLBK_480;                
			ICON_ZOOMLEVEL_3_PLBK                   =ICON_ZOOMLEVEL_3_PLBK_480;                
			ICON_ZOOMLEVEL_4_PLBK                   =ICON_ZOOMLEVEL_4_PLBK_480;                
			ICON_INFOBAR_STATUS120X32               =ICON_INFOBAR_STATUS120X32_480;            
			ICON_INFOBAR_PLAYTIME_BACKGROUND_2      =ICON_INFOBAR_PLAYTIME_BACKGROUND_2_480;   
			ICON_MUSIC_PROCESSBAR_BLANK             =ICON_MUSIC_PROCESSBAR_BLANK_480;          
			ICON_MUSIC_TIME_BLANK                   =ICON_MUSIC_TIME_BLANK_480;                
			ICON_CF_FOCUS                           =ICON_CF_FOCUS_480;                        
			ICON_CF_LOSE                            =ICON_CF_LOSE_480;                         
			ICON_SD_FOCUS                           =ICON_SD_FOCUS_480;                        
			ICON_SD_LOSE                            =ICON_SD_LOSE_480;                         
			ICON_USB_FOCUS                          =ICON_USB_FOCUS_480;                       
			ICON_USB_LOSE                           =ICON_USB_LOSE_480;                        
			ICON_XD_LOSE                            =ICON_XD_LOSE_480;                         
			ICON_XD_FOCUS                           =ICON_XD_FOCUS_480;                        
			ICON_MS_FOCUS                           =ICON_MS_FOCUS_480;                        
			ICON_MS_LOSE                            =ICON_MS_LOSE_480;                         
			ICON_SETUP_FOCUS                        =ICON_SETUP_FOCUS_480;                     
			ICON_SETUP_LOSE                         =ICON_SETUP_LOSE_480;                      
			ICON_DEVICEEMPTY                        =ICON_DEVICEEMPTY_480;                     
			ICON_DEVICENAME_BCK                     =ICON_DEVICENAME_BCK_480;                  
			ICON_ARROW_EMPTY                        =ICON_ARROW_EMPTY_480;                     
			ICON_LEFT_ARROW                         =ICON_LEFT_ARROW_480;                      
			ICON_RIGHT_ARROW                        =ICON_RIGHT_ARROW_480;                     
			ICON_FILETYPE_NAME_BLANK                =ICON_FILETYPE_NAME_BLANK_480;             
			ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING     	=ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING_480;  
			ICON_UNKNOW_FOCUS                       =ICON_UNKNOW_FOCUS_480;                    
			ICON_UNKNOW_LOSE                        =ICON_UNKNOW_LOSE_480;     
			ICON_ARROW_BACKGROUND_DOWN				=ICON_ARROW_BACKGROUND_DOWN_480;
			ICON_ARROW_BACKGROUND_UP				=ICON_ARROW_BACKGROUND_UP_480;
			ICON_ARROW_BACKGROUND					=ICON_ARROW_BACKGROUND_480;
			ICON_ARROW_CDBKG						=ICON_ARROW_CDBKG_480;
			ICON_ARROW_DOWN							=ICON_ARROW_DOWN_480;
			ICON_ARROW_UP							=ICON_ARROW_UP_480;
			ICON_ARROW_DOWN_VIDEO					=ICON_ARROW_DOWN_VIDEO_480;
			ICON_ARROW_UP_VIDEO						=ICON_ARROW_UP_VIDEO_480;
			ICON_PREV_UNSUPPORT						=ICON_PREV_UNSUPPORT_480; 
			ICON_UNSUPPORT_VIDEO_CONFIG				=ICON_UNSUPPORT_VIDEO_CONFIG_480 ;
			ICON_TIP_BLANK							=ICON_TIP_BLANK_480;
			ICON_SCREEN_SAVE                             =ICON_SCREEN_SAVE_480P;
			ICON_PC_CONNECT							=ICON_PC_CONNECT_480;
			break;
#endif

#ifdef TV_MODE_720P			
		case OsdSize720p:
			ICON_MOVIE_PREV_BACKGROUND				=ICON_MOVIE_PREV_BACKGROUND_720P;
			ICON_PROCESS_BAR                        =ICON_PROCESS_BAR_720P;                     
			ICON_SETUP_TOP                          =ICON_SETUP_TOP_720P;                       
			ICON_SETUP_SELECT_BAR                   =ICON_SETUP_SELECT_BAR_720P;                
			ICON_SETUP_SELECT_BAR_DEFAULT           =ICON_SETUP_SELECT_BAR_DEFAULT_720P;        
			ICON_SETUP_BAR                          =ICON_SETUP_BAR_720P;                       
			ICON_SLIDE_BAR                          =ICON_SLIDE_BAR_720P;                       
			ICON_FILE_FOCUS                         =ICON_FILE_FOCUS_720P;                      
			ICON_FILE_LOSE                          =ICON_FILE_LOSE_720P;                       
			ICON_MOVIE_FOCUS                        =ICON_MOVIE_FOCUS_720P;                     
			ICON_MOVIE_LOSE                         =ICON_MOVIE_LOSE_720P;                      
			ICON_MUSIC_FOCUS                        =ICON_MUSIC_FOCUS_720P;                     
			ICON_MUSIC_LOSE                         =ICON_MUSIC_LOSE_720P;                      
			ICON_PHOTO_FOCUS                        =ICON_PHOTO_FOCUS_720P;                     
			ICON_PHOTO_LOSE                         =ICON_PHOTO_LOSE_720P;
#ifdef TXT_PLAYER			
			ICON_TXT_FOCUS                          =ICON_TXT_FOCUS_720P;                     
			ICON_TXT_LOSE                           =ICON_TXT_LOSE_720P; 
			ICON_TXT_TOP                           =ICON_TXT_TOP_720P; 
#endif			
			ICON_MOVIE_PREVIEW_ENABLE               =ICON_MOVIE_PREVIEW_ENABLE_720P;            
			ICON_SPEAKER                            =ICON_SPEAKER_720P;                         
			ICON_INFO_BACKGROUNG                    =ICON_INFO_BACKGROUNG_720P;                 
			ICON_FILELIST_DOWN                      =ICON_FILELIST_DOWN_720P;                   
			ICON_FILELIST_INFO_BLANK                =ICON_FILELIST_INFO_BLANK_720P;             
			ICON_FILELIST_LEFT                      =ICON_FILELIST_LEFT_720P;                   
			ICON_FILELIST_MUSIC_BACKGROUND          =ICON_FILELIST_MUSIC_BACKGROUND_720P;       
			ICON_FILELIST_RIGHT                     =ICON_FILELIST_RIGHT_720P;                  
			ICON_FILELIST_UP                        =ICON_FILELIST_UP_720P;                     
			ICON_FILE_FILE_TYPE_FOCUS               =ICON_FILE_FILE_TYPE_FOCUS_720P;            
			ICON_FILE_FILE_TYPE_LOSE                =ICON_FILE_FILE_TYPE_LOSE_720P;             
			ICON_FILE_MOVIE_TYPE_FOCUS              =ICON_FILE_MOVIE_TYPE_FOCUS_720P;           
			ICON_FILE_MOVIE_TYPE_LOSE               =ICON_FILE_MOVIE_TYPE_LOSE_720P;            
			ICON_FILE_MUSIC_TYPE_FOCUS              =ICON_FILE_MUSIC_TYPE_FOCUS_720P;           
			ICON_FILE_MUSIC_TYPE_LOSE               =ICON_FILE_MUSIC_TYPE_LOSE_720P;            
			ICON_FILE_PHOTO_TYPE_FOCUS              =ICON_FILE_PHOTO_TYPE_FOCUS_720P;           
			ICON_FILE_PHOTO_TYPE_LOSE               =ICON_FILE_PHOTO_TYPE_LOSE_720P;            
			ICON_FILE_TOP                           =ICON_FILE_TOP_720P;                        
			ICON_MOVIE_TOP                          =ICON_MOVIE_TOP_720P;                       
			ICON_MUSIC_TOP                          =ICON_MUSIC_TOP_720P;                       
			ICON_PHOTO_TOP                          =ICON_PHOTO_TOP_720P;                       
			ICON_MUSIC_INFO_BLANK                   =ICON_MUSIC_INFO_BLANK_720P;                
			ICON_FILELIST_BAR_FOCUS                 =ICON_FILELIST_BAR_FOCUS_720P;              
			ICON_FILELIST_BAR_LOSE                  =ICON_FILELIST_BAR_LOSE_720P;               
			ICON_FILELIST_BAR_FOCUS_PICKED          =ICON_FILELIST_BAR_FOCUS_PICKED_720P;       
			ICON_FILELIST_BAR_LOSE_PICKED           =ICON_FILELIST_BAR_LOSE_PICKED_720P;        
			ICON_MUSIC_PLAY_BAR                     =ICON_MUSIC_PLAY_BAR_720P;                  
			ICON_TIME_BACGROUND                     =ICON_PHOTO_INFO_BACKROUNG_720P;
			ICON_COMBO                              =ICON_COMBO_480;                           
			ICON_MINIBAR_TRANS                      =ICON_MINIBAR_TRANS_480;                   
			ICON_UNMUTE                             =ICON_UNMUTE_480;                          
            ICON_INFOBAR_STATUS512                  =ICON_INFOBAR_STATUS512_720P;        
			ICON_MUTE                               =ICON_MUTE_480;                            
			ICON_INFOBAR_STATUS140                  =ICON_INFOBAR_STATUS140_480;               
			ICON_ROTATE_90                          =ICON_ROTATE_90_480;                       
			ICON_ROTATE_180                         =ICON_ROTATE_180_480;                      
			ICON_ROTATE_270                         =ICON_ROTATE_270_480;                      
			ICON_ZOOMLEVEL_8                        =ICON_ZOOMLEVEL_8_480;                     
			ICON_ZOOMLEVEL_16                       =ICON_ZOOMLEVEL_16_480;                    
			ICON_INFOBAR_STATUS1                    =ICON_INFOBAR_STATUS1_480;                 
			ICON_INFOBAR_BACKGROUND                 =ICON_INFOBAR_BACKGROUND_480;              
			ICON_PREV_LOSE                          =ICON_PREV_LOSE_480;                       
			ICON_PREV_FOCUS                         =ICON_PREV_FOCUS_480;                      
			ICON_PLAY_FOCUS                         =ICON_PLAY_FOCUS_480;                      
			ICON_PLAY_LOSE                          =ICON_PLAY_LOSE_480;                       
			ICON_NEXT_LOSE                          =ICON_NEXT_LOSE_480;                       
			ICON_NEXT_FOCUS                         =ICON_NEXT_FOCUS_480;                      
			ICON_ROTATE_LOSE                        =ICON_ROTATE_LOSE_480;                     
			ICON_ROTATE_FOCUS                       =ICON_ROTATE_FOCUS_480;                    
			ICON_STOP_LOSE                          =ICON_STOP_LOSE_480;                       
			ICON_STOP_FOCUS                         =ICON_STOP_FOCUS_480;                      
			ICON_ZOOM_LOSE                          =ICON_ZOOM_LOSE_480;                       
			ICON_ZOOM_FOCUS                         =ICON_ZOOM_FOCUS_480;                      
			ICON_X                                  =ICON_X_480;                               
			ICON_X2                                 =ICON_X2_480;                              
			ICON_X4                                 =ICON_X4_480;                              
			ICON_PAUSE_LOSE                         =ICON_PAUSE_LOSE_480;                      
			ICON_PAUSE_FOCUS                        =ICON_PAUSE_FOCUS_480;                    
			ICON_PHOTO_BACKGROUND                   =ICON_PHOTO_BACKGROUND_720P;                
			ICON_PIC_FOCUS                          =ICON_PIC_FOCUS_720P;                       
			ICON_PIC_LOSE                           =ICON_PIC_LOSE_720P;                        
			ICON_VOLUME_MUTE                        =ICON_VOLUME_MUTE_720P;                     
			ICON_MOVIE_INFOR                        =ICON_MOVIE_INFOR_720P;                     
			ICON_PHOTO_INFO_BACKROUNG               =ICON_PHOTO_INFO_BACKROUNG_720P;            
			ICON_PAGE_BACKROUNG                     =ICON_PHOTO_PAGE_BACKROUNG_720P;  
			ICON_VOLUME0                            =ICON_VOLUME0_720P;                         
			ICON_VOLUME1                            =ICON_VOLUME1_720P;                         
			ICON_VOLUME2                            =ICON_VOLUME2_720P;                         
			ICON_VOLUME3                            =ICON_VOLUME3_720P;                         
			ICON_VOLUME4                            =ICON_VOLUME4_720P;                         
			ICON_VOLUME5                            =ICON_VOLUME5_720P;                         
			ICON_VOLUME6                            =ICON_VOLUME6_720P;                         
			ICON_VOLUME7                            =ICON_VOLUME7_720P;                         
			ICON_VOLUME_BLANK                       =ICON_VOLUME_BLANK_720P;                    
			ICON_VOLUME_SPACE                       =ICON_VOLUME_SPACE_720P;                    
			ICON_INFO_PLAY                          =ICON_INFO_PLAY_720P;                       
			ICON_INFO_PAUSE                         =ICON_INFO_PAUSE_720P;                      
			ICON_INFO_BLANK                         =ICON_INFO_BLANK_720P;                      
			ICON_INFO_FB                            =ICON_INFO_FB_720P;                         
			ICON_INFO_FF                            =ICON_INFO_FF_720P;                         
			ICON_MUSIC_SPECTRUM_BK                  =ICON_MUSIC_SPECTRUM_BK_720P;               
			ICON_PATH_BLANK                         =ICON_PATH_BLANK_720P;                      
			ICON_NO_FOCUS                           =ICON_NO_FOCUS_720P;                        
			ICON_YES_FOCUS                          =ICON_YES_FOCUS_720P;                       
			ICON_NO_LOSE                            =ICON_NO_LOSE_720P;                         
			ICON_YES_LOSE                           =ICON_YES_LOSE_720P;                        
			ICON_UPGRADE_BACKGROUND                 =ICON_UPGRADE_BACKGROUND_720P;              
			ICON_UPGRADE_BLANK                      =ICON_UPGRADE_BLANK_720P;                   
			ICON_UPGRADE_PERCENT_INFOBAR            =ICON_UPGRADE_PERCENT_INFOBAR_720P;         
			ICON_COPYDEL_BIG                        =ICON_COPYDEL_BIG_720P;                     
			ICON_COPYDEL_BKG                        =ICON_COPYDEL_BKG_720P;                     
			ICON_COPYDEL_FINISHED                   =ICON_COPYDEL_FINISHED_720P;                
			ICON_COPYDEL_FOCUS                      =ICON_COPYDEL_FOCUS_720P;                   
			ICON_COPYDEL_LOSE                       =ICON_COPYDEL_LOSE_720P;                    
			ICON_COPYDEL_SMALL                      =ICON_COPYDEL_SMALL_720P;                   
			ICON_COPYINGFILE1                       =ICON_COPYINGFILE1_720P;                    
			ICON_COPYINGFILE2                       =ICON_COPYINGFILE2_720P;                    
			ICON_60                                 =ICON_60_720P;                              
			
			ICON_MUSIC_PLAY_BAR_BK                  =ICON_MUSIC_PLAY_BAR_BK_720P;               
			ICON_2_MUSIC                            =ICON_2_MUSIC_720P;                         
			ICON_4_MUSIC                            =ICON_4_MUSIC_720P;                         
			ICON_8_MUSIC                            =ICON_8_MUSIC_720P;                         
			ICON_INFOBAR_FB_FOCUS_PLBK              =ICON_INFOBAR_FB_FOCUS_PLBK_480;
			ICON_INFOBAR_FB_LOSE_PLBK               =ICON_INFOBAR_FB_LOSE_PLBK_480;
			ICON_INFOBAR_FF_FOCUS_PLBK              =ICON_INFOBAR_FF_FOCUS_PLBK_480;
			ICON_INFOBAR_FF_LOSE_PLBK               =ICON_INFOBAR_FF_LOSE_PLBK_480;
			ICON_INFOBAR_STATUS512_PLBK             =ICON_INFOBAR_STATUS512_PLBK_480;          
			ICON_NEXT_FOCUS_PLBK                    =ICON_NEXT_FOCUS_PLBK_480;
			ICON_NEXT_LOSE_PLBK                     =ICON_NEXT_LOSE_PLBK_480;
			ICON_PAUSE_FOCUS_PLBK                   =ICON_PAUSE_FOCUS_PLBK_480;
			ICON_PAUSE_LOSE_PLBK                    =ICON_PAUSE_LOSE_PLBK_480;                 
			ICON_PLAY_FOCUS_PLBK                    =ICON_PLAY_FOCUS_PLBK_480;                 
			ICON_PLAY_LOSE_PLBK                     =ICON_PLAY_LOSE_PLBK_480;
			ICON_PREV_FOCUS_PLBK                    =ICON_PREV_FOCUS_PLBK_480;
			ICON_PREV_LOSE_PLBK                     =ICON_PREV_LOSE_PLBK_480;
			ICON_STOP_FOCUS_PLBK                    =ICON_STOP_FOCUS_PLBK_480;
			ICON_STOP_LOSE_PLBK                     =ICON_STOP_LOSE_PLBK_480;
			ICON_SUB_FOCUS_PLBK                    =ICON_SUB_FOCUS_PLBK_480;                 
			ICON_SUB_LOSE_PLBK                     =ICON_SUB_LOSE_PLBK_480;  
			ICON_SUB_NO_PLBK				        =ICON_SUB_NO_PLBK_480;
		#ifdef AVI_SUBTITLE_ZOOM
			ICON_SUB_BLANK_PLBK			            = ICON_SUB_BLANK_PLBK_720P;
		#else
			ICON_SUB_BLANK_PLBK			            = ICON_SUB_BLANK_PLBK_480;
		#endif
			ICON_X1_PLBK                            =ICON_X1_PLBK_480;
			ICON_X2_PLBK                            =ICON_X2_PLBK_480;
			ICON_X3_PLBK                            =ICON_X3_PLBK_480;
			ICON_X4_PLBK                            =ICON_X4_PLBK_480;
			ICON_X5_PLBK                            =ICON_X5_PLBK_480;
			ICON_X_PLBK                             =ICON_X_PLBK_480;
			ICON_ZOOM_FOCUS_PLBK                    =ICON_ZOOM_FOCUS_PLBK_480;
			ICON_ZOOM_LOSE_PLBK                     =ICON_ZOOM_LOSE_PLBK_480;
			ICON_ZOOMLEVEL_PLBK                     =ICON_ZOOMLEVEL_PLBK_480;
			ICON_ZOOMLEVEL_1_PLBK                   =ICON_ZOOMLEVEL_1_PLBK_480;
			ICON_ZOOMLEVEL_2_PLBK                   =ICON_ZOOMLEVEL_2_PLBK_480;
			ICON_ZOOMLEVEL_3_PLBK                   =ICON_ZOOMLEVEL_3_PLBK_480;
			ICON_ZOOMLEVEL_4_PLBK                   =ICON_ZOOMLEVEL_4_PLBK_480;
			ICON_INFOBAR_STATUS120X32               =ICON_INFOBAR_STATUS120X32_480;            
			ICON_INFOBAR_PLAYTIME_BACKGROUND_2      =ICON_INFOBAR_PLAYTIME_BACKGROUND_2_480;   
			ICON_MUSIC_PROCESSBAR_BLANK             =ICON_MUSIC_PROCESSBAR_BLANK_720P;          
			ICON_MUSIC_TIME_BLANK                   =ICON_MUSIC_TIME_BLANK_720P;                
			ICON_CF_FOCUS                           =ICON_CF_FOCUS_720P;                        
			ICON_CF_LOSE                            =ICON_CF_LOSE_720P;                         
			ICON_SD_FOCUS                           =ICON_SD_FOCUS_720P;                        
			ICON_SD_LOSE                            =ICON_SD_LOSE_720P;                         
			ICON_USB_FOCUS                          =ICON_USB_FOCUS_720P;                       
			ICON_USB_LOSE                           =ICON_USB_LOSE_720P;                        
			ICON_XD_LOSE                            =ICON_XD_LOSE_720P;                         
			ICON_XD_FOCUS                           =ICON_XD_FOCUS_720P;                        
			ICON_MS_FOCUS                           =ICON_MS_FOCUS_720P;                        
			ICON_MS_LOSE                            =ICON_MS_LOSE_720P;                         
			ICON_SETUP_FOCUS                        =ICON_SETUP_FOCUS_720P;                     
			ICON_SETUP_LOSE                         =ICON_SETUP_LOSE_720P;                      
			ICON_DEVICEEMPTY                        =ICON_DEVICEEMPTY_720P;                     
			ICON_DEVICENAME_BCK                     =ICON_DEVICENAME_BCK_720P;                  
			ICON_ARROW_EMPTY                        =ICON_ARROW_EMPTY_720P;                     
			ICON_LEFT_ARROW                         =ICON_LEFT_ARROW_720P;                      
			ICON_RIGHT_ARROW                        =ICON_RIGHT_ARROW_720P;                     
			ICON_FILETYPE_NAME_BLANK                =ICON_FILETYPE_NAME_BLANK_720P;             
			ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING     	=ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING_720P;  
			ICON_UNKNOW_FOCUS                       =ICON_UNKNOW_FOCUS_720P;                    
			ICON_UNKNOW_LOSE                        =ICON_UNKNOW_LOSE_720P;              
			ICON_ARROW_BACKGROUND_DOWN				=ICON_ARROW_BACKGROUND_DOWN_720P;
			ICON_ARROW_BACKGROUND_UP				=ICON_ARROW_BACKGROUND_UP_720P;
			ICON_ARROW_BACKGROUND					=ICON_ARROW_BACKGROUND_720P;
			ICON_ARROW_CDBKG						=ICON_ARROW_CDBKG_720P;
			ICON_ARROW_DOWN							=ICON_ARROW_DOWN_720P;
			ICON_ARROW_UP							=ICON_ARROW_UP_720P;
			ICON_ARROW_DOWN_VIDEO					=ICON_ARROW_DOWN_VIDEO_720P;
			ICON_ARROW_UP_VIDEO						=ICON_ARROW_UP_VIDEO_720P;
			ICON_PREV_UNSUPPORT						=ICON_PREV_UNSUPPORT_720P;
			ICON_UNSUPPORT_VIDEO_CONFIG				=ICON_UNSUPPORT_VIDEO_CONFIG_480 ;
			ICON_TIP_BLANK						=ICON_TIP_BLANK_720P;
			ICON_SCREEN_SAVE                      =ICON_SCREEN_SAVE_720P;
			ICON_PC_CONNECT							=ICON_PC_CONNECT_720P;
			break;		
#endif

#ifdef TV_MODE_1080P			
		case OsdSize1080p:
			ICON_MOVIE_PREV_BACKGROUND				=ICON_MOVIE_PREV_BACKGROUND_1080P;
			ICON_PROCESS_BAR                        =ICON_PROCESS_BAR_1080P;                     
			ICON_SETUP_TOP                          =ICON_SETUP_TOP_1080P;                       
			ICON_SETUP_SELECT_BAR                   =ICON_SETUP_SELECT_BAR_1080P;                
			ICON_SETUP_SELECT_BAR_DEFAULT           =ICON_SETUP_SELECT_BAR_DEFAULT_1080P;        
			ICON_SETUP_BAR                          =ICON_SETUP_BAR_1080P;                       
			ICON_SLIDE_BAR                          =ICON_SLIDE_BAR_1080P;                       
			ICON_FILE_FOCUS                         =ICON_FILE_FOCUS_1080P;                      
			ICON_FILE_LOSE                          =ICON_FILE_LOSE_1080P;                       
			ICON_MOVIE_FOCUS                        =ICON_MOVIE_FOCUS_1080P;                     
			ICON_MOVIE_LOSE                         =ICON_MOVIE_LOSE_1080P;                      
			ICON_MUSIC_FOCUS                        =ICON_MUSIC_FOCUS_1080P;                     
			ICON_MUSIC_LOSE                         =ICON_MUSIC_LOSE_1080P;                      
			ICON_PHOTO_FOCUS                        =ICON_PHOTO_FOCUS_1080P;                     
			ICON_PHOTO_LOSE                         =ICON_PHOTO_LOSE_1080P;
#ifdef TXT_PLAYER			
			ICON_TXT_FOCUS                          =ICON_TXT_FOCUS_1080P;                     
			ICON_TXT_LOSE                           =ICON_TXT_LOSE_1080P; 
			ICON_TXT_TOP                           =ICON_TXT_TOP_1080P; 
#endif			
			ICON_MOVIE_PREVIEW_ENABLE               =ICON_MOVIE_PREVIEW_ENABLE_1080P;            
			ICON_SPEAKER                            =ICON_SPEAKER_1080P;                         
			ICON_INFO_BACKGROUNG                    =ICON_INFO_BACKGROUNG_1080P;                 
			ICON_FILELIST_DOWN                      =ICON_FILELIST_DOWN_1080P;                   
			ICON_FILELIST_INFO_BLANK                =ICON_FILELIST_INFO_BLANK_1080P;             
			ICON_FILELIST_LEFT                      =ICON_FILELIST_LEFT_1080P;                   
			ICON_FILELIST_MUSIC_BACKGROUND          =ICON_FILELIST_MUSIC_BACKGROUND_1080P;       
			ICON_FILELIST_RIGHT                     =ICON_FILELIST_RIGHT_1080P;                  
			ICON_FILELIST_UP                        =ICON_FILELIST_UP_1080P;                     
			ICON_FILE_FILE_TYPE_FOCUS               =ICON_FILE_FILE_TYPE_FOCUS_1080P;            
			ICON_FILE_FILE_TYPE_LOSE                =ICON_FILE_FILE_TYPE_LOSE_1080P;             
			ICON_FILE_MOVIE_TYPE_FOCUS              =ICON_FILE_MOVIE_TYPE_FOCUS_1080P;           
			ICON_FILE_MOVIE_TYPE_LOSE               =ICON_FILE_MOVIE_TYPE_LOSE_1080P;            
			ICON_FILE_MUSIC_TYPE_FOCUS              =ICON_FILE_MUSIC_TYPE_FOCUS_1080P;           
			ICON_FILE_MUSIC_TYPE_LOSE               =ICON_FILE_MUSIC_TYPE_LOSE_1080P;            
			ICON_FILE_PHOTO_TYPE_FOCUS              =ICON_FILE_PHOTO_TYPE_FOCUS_1080P;           
			ICON_FILE_PHOTO_TYPE_LOSE               =ICON_FILE_PHOTO_TYPE_LOSE_1080P;            
			ICON_FILE_TOP                           =ICON_FILE_TOP_1080P;                        
			ICON_MOVIE_TOP                          =ICON_MOVIE_TOP_1080P;                       
			ICON_MUSIC_TOP                          =ICON_MUSIC_TOP_1080P;                       
			ICON_PHOTO_TOP                          =ICON_PHOTO_TOP_1080P;                       
			ICON_MUSIC_INFO_BLANK                   =ICON_MUSIC_INFO_BLANK_1080P;                
			ICON_FILELIST_BAR_FOCUS                 =ICON_FILELIST_BAR_FOCUS_1080P;              
			ICON_FILELIST_BAR_LOSE                  =ICON_FILELIST_BAR_LOSE_1080P;               
			ICON_FILELIST_BAR_FOCUS_PICKED          =ICON_FILELIST_BAR_FOCUS_PICKED_1080P;       
			ICON_FILELIST_BAR_LOSE_PICKED           =ICON_FILELIST_BAR_LOSE_PICKED_1080P;        
			ICON_MUSIC_PLAY_BAR                     =ICON_MUSIC_PLAY_BAR_1080P;                  
			ICON_TIME_BACGROUND                     =ICON_PHOTO_INFO_BACKROUNG_1080P;
			ICON_COMBO                              =ICON_COMBO_480;                           
			ICON_MINIBAR_TRANS                      =ICON_MINIBAR_TRANS_480;                   
			ICON_UNMUTE                             =ICON_UNMUTE_480;                          
            ICON_INFOBAR_STATUS512                  =ICON_INFOBAR_STATUS512_1080P;        
			ICON_MUTE                               =ICON_MUTE_480;                            
			ICON_INFOBAR_STATUS140                  =ICON_INFOBAR_STATUS140_480;               
			ICON_ROTATE_90                          =ICON_ROTATE_90_480;                       
			ICON_ROTATE_180                         =ICON_ROTATE_180_480;                      
			ICON_ROTATE_270                         =ICON_ROTATE_270_480;                      
			ICON_ZOOMLEVEL_8                        =ICON_ZOOMLEVEL_8_480;                     
			ICON_ZOOMLEVEL_16                       =ICON_ZOOMLEVEL_16_480;                    
			ICON_INFOBAR_STATUS1                    =ICON_INFOBAR_STATUS1_480;                 
			ICON_INFOBAR_BACKGROUND                 =ICON_INFOBAR_BACKGROUND_480;              
			ICON_PREV_LOSE                          =ICON_PREV_LOSE_480;                       
			ICON_PREV_FOCUS                         =ICON_PREV_FOCUS_480;                      
			ICON_PLAY_FOCUS                         =ICON_PLAY_FOCUS_480;                      
			ICON_PLAY_LOSE                          =ICON_PLAY_LOSE_480;                       
			ICON_NEXT_LOSE                          =ICON_NEXT_LOSE_480;                       
			ICON_NEXT_FOCUS                         =ICON_NEXT_FOCUS_480;                      
			ICON_ROTATE_LOSE                        =ICON_ROTATE_LOSE_480;                     
			ICON_ROTATE_FOCUS                       =ICON_ROTATE_FOCUS_480;                    
			ICON_STOP_LOSE                          =ICON_STOP_LOSE_480;                       
			ICON_STOP_FOCUS                         =ICON_STOP_FOCUS_480;                      
			ICON_ZOOM_LOSE                          =ICON_ZOOM_LOSE_480;                       
			ICON_ZOOM_FOCUS                         =ICON_ZOOM_FOCUS_480;                      
			ICON_X                                  =ICON_X_480;                               
			ICON_X2                                 =ICON_X2_480;                              
			ICON_X4                                 =ICON_X4_480;                              
			ICON_PAUSE_LOSE                         =ICON_PAUSE_LOSE_480;                      
			ICON_PAUSE_FOCUS                        =ICON_PAUSE_FOCUS_480;                    
			ICON_PHOTO_BACKGROUND                   =ICON_PHOTO_BACKGROUND_1080P;                
			ICON_PIC_FOCUS                          =ICON_PIC_FOCUS_1080P;                       
			ICON_PIC_LOSE                           =ICON_PIC_LOSE_1080P;                        
			ICON_VOLUME_MUTE                        =ICON_VOLUME_MUTE_1080P;                     
			ICON_MOVIE_INFOR                        =ICON_MOVIE_INFOR_1080P;                     
			ICON_PHOTO_INFO_BACKROUNG               =ICON_PHOTO_INFO_BACKROUNG_1080P;            
			ICON_PAGE_BACKROUNG                     =ICON_PHOTO_PAGE_BACKROUNG_1080P;  
			ICON_VOLUME0                            =ICON_VOLUME0_1080P;                         
			ICON_VOLUME1                            =ICON_VOLUME1_1080P;                         
			ICON_VOLUME2                            =ICON_VOLUME2_1080P;                         
			ICON_VOLUME3                            =ICON_VOLUME3_1080P;                         
			ICON_VOLUME4                            =ICON_VOLUME4_1080P;                         
			ICON_VOLUME5                            =ICON_VOLUME5_1080P;                         
			ICON_VOLUME6                            =ICON_VOLUME6_1080P;                         
			ICON_VOLUME7                            =ICON_VOLUME7_1080P;                         
			ICON_VOLUME_BLANK                       =ICON_VOLUME_BLANK_1080P;                    
			ICON_VOLUME_SPACE                       =ICON_VOLUME_SPACE_1080P;                    
			ICON_INFO_PLAY                          =ICON_INFO_PLAY_1080P;                       
			ICON_INFO_PAUSE                         =ICON_INFO_PAUSE_1080P;                      
			ICON_INFO_BLANK                         =ICON_INFO_BLANK_1080P;                      
			ICON_INFO_FB                            =ICON_INFO_FB_1080P;                         
			ICON_INFO_FF                            =ICON_INFO_FF_1080P;                         
			ICON_MUSIC_SPECTRUM_BK                  =ICON_MUSIC_SPECTRUM_BK_1080P;               
			ICON_PATH_BLANK                         =ICON_PATH_BLANK_1080P;                      
			ICON_NO_FOCUS                           =ICON_NO_FOCUS_1080P;                        
			ICON_YES_FOCUS                          =ICON_YES_FOCUS_1080P;                       
			ICON_NO_LOSE                            =ICON_NO_LOSE_1080P;                         
			ICON_YES_LOSE                           =ICON_YES_LOSE_1080P;                        
			ICON_UPGRADE_BACKGROUND                 =ICON_UPGRADE_BACKGROUND_1080P;              
			ICON_UPGRADE_BLANK                      =ICON_UPGRADE_BLANK_1080P;                   
			ICON_UPGRADE_PERCENT_INFOBAR            =ICON_UPGRADE_PERCENT_INFOBAR_1080P;         
			ICON_COPYDEL_BIG                        =ICON_COPYDEL_BIG_1080P;                     
			ICON_COPYDEL_BKG                        =ICON_COPYDEL_BKG_1080P;                     
			ICON_COPYDEL_FINISHED                   =ICON_COPYDEL_FINISHED_1080P;                
			ICON_COPYDEL_FOCUS                      =ICON_COPYDEL_FOCUS_1080P;                   
			ICON_COPYDEL_LOSE                       =ICON_COPYDEL_LOSE_1080P;                    
			ICON_COPYDEL_SMALL                      =ICON_COPYDEL_SMALL_1080P;                   
			ICON_COPYINGFILE1                       =ICON_COPYINGFILE1_1080P;                    
			ICON_COPYINGFILE2                       =ICON_COPYINGFILE2_1080P;                    
			ICON_60                                 =ICON_60_1080P;                              
			
			ICON_MUSIC_PLAY_BAR_BK                  =ICON_MUSIC_PLAY_BAR_BK_1080P;               
			ICON_2_MUSIC                            =ICON_2_MUSIC_1080P;                         
			ICON_4_MUSIC                            =ICON_4_MUSIC_1080P;                         
			ICON_8_MUSIC                            =ICON_8_MUSIC_1080P;                         
			ICON_INFOBAR_FB_FOCUS_PLBK              =ICON_INFOBAR_FB_FOCUS_PLBK_480;
			ICON_INFOBAR_FB_LOSE_PLBK               =ICON_INFOBAR_FB_LOSE_PLBK_480;
			ICON_INFOBAR_FF_FOCUS_PLBK              =ICON_INFOBAR_FF_FOCUS_PLBK_480;
			ICON_INFOBAR_FF_LOSE_PLBK               =ICON_INFOBAR_FF_LOSE_PLBK_480;
			ICON_INFOBAR_STATUS512_PLBK             =ICON_INFOBAR_STATUS512_PLBK_480;          
			ICON_NEXT_FOCUS_PLBK                    =ICON_NEXT_FOCUS_PLBK_480;
			ICON_NEXT_LOSE_PLBK                     =ICON_NEXT_LOSE_PLBK_480;
			ICON_PAUSE_FOCUS_PLBK                   =ICON_PAUSE_FOCUS_PLBK_480;
			ICON_PAUSE_LOSE_PLBK                    =ICON_PAUSE_LOSE_PLBK_480;                 
			ICON_PLAY_FOCUS_PLBK                    =ICON_PLAY_FOCUS_PLBK_480;                 
			ICON_PLAY_LOSE_PLBK                     =ICON_PLAY_LOSE_PLBK_480;
			ICON_PREV_FOCUS_PLBK                    =ICON_PREV_FOCUS_PLBK_480;
			ICON_PREV_LOSE_PLBK                     =ICON_PREV_LOSE_PLBK_480;
			ICON_STOP_FOCUS_PLBK                    =ICON_STOP_FOCUS_PLBK_480;
			ICON_STOP_LOSE_PLBK                     =ICON_STOP_LOSE_PLBK_480;
			ICON_SUB_FOCUS_PLBK                    =ICON_SUB_FOCUS_PLBK_480;                 
			ICON_SUB_LOSE_PLBK                     =ICON_SUB_LOSE_PLBK_480;  
			ICON_SUB_NO_PLBK				=ICON_SUB_NO_PLBK_480;
			ICON_SUB_BLANK_PLBK			=ICON_SUB_BLANK_PLBK_480;
			ICON_X1_PLBK                            =ICON_X1_PLBK_480;
			ICON_X2_PLBK                            =ICON_X2_PLBK_480;
			ICON_X3_PLBK                            =ICON_X3_PLBK_480;
			ICON_X4_PLBK                            =ICON_X4_PLBK_480;
			ICON_X5_PLBK                            =ICON_X5_PLBK_480;
			ICON_X_PLBK                             =ICON_X_PLBK_480;
			ICON_ZOOM_FOCUS_PLBK                    =ICON_ZOOM_FOCUS_PLBK_480;
			ICON_ZOOM_LOSE_PLBK                     =ICON_ZOOM_LOSE_PLBK_480;
			ICON_ZOOMLEVEL_PLBK                     =ICON_ZOOMLEVEL_PLBK_480;
			ICON_ZOOMLEVEL_1_PLBK                   =ICON_ZOOMLEVEL_1_PLBK_480;
			ICON_ZOOMLEVEL_2_PLBK                   =ICON_ZOOMLEVEL_2_PLBK_480;
			ICON_ZOOMLEVEL_3_PLBK                   =ICON_ZOOMLEVEL_3_PLBK_480;
			ICON_ZOOMLEVEL_4_PLBK                   =ICON_ZOOMLEVEL_4_PLBK_480;
			ICON_INFOBAR_STATUS120X32               =ICON_INFOBAR_STATUS120X32_480;            
			ICON_INFOBAR_PLAYTIME_BACKGROUND_2      =ICON_INFOBAR_PLAYTIME_BACKGROUND_2_480;   
			ICON_MUSIC_PROCESSBAR_BLANK             =ICON_MUSIC_PROCESSBAR_BLANK_1080P;          
			ICON_MUSIC_TIME_BLANK                   =ICON_MUSIC_TIME_BLANK_1080P;                
			ICON_CF_FOCUS                           =ICON_CF_FOCUS_1080P;                        
			ICON_CF_LOSE                            =ICON_CF_LOSE_1080P;                         
			ICON_SD_FOCUS                           =ICON_SD_FOCUS_1080P;                        
			ICON_SD_LOSE                            =ICON_SD_LOSE_1080P;                         
			ICON_USB_FOCUS                          =ICON_USB_FOCUS_1080P;                       
			ICON_USB_LOSE                           =ICON_USB_LOSE_1080P;                        
			ICON_XD_LOSE                            =ICON_XD_LOSE_1080P;                         
			ICON_XD_FOCUS                           =ICON_XD_FOCUS_1080P;                        
			ICON_MS_FOCUS                           =ICON_MS_FOCUS_1080P;                        
			ICON_MS_LOSE                            =ICON_MS_LOSE_1080P;                         
			ICON_SETUP_FOCUS                        =ICON_SETUP_FOCUS_1080P;                     
			ICON_SETUP_LOSE                         =ICON_SETUP_LOSE_1080P;                      
			ICON_DEVICEEMPTY                        =ICON_DEVICEEMPTY_1080P;                     
			ICON_DEVICENAME_BCK                     =ICON_DEVICENAME_BCK_1080P;                  
			ICON_ARROW_EMPTY                        =ICON_ARROW_EMPTY_1080P;                     
			ICON_LEFT_ARROW                         =ICON_LEFT_ARROW_1080P;                      
			ICON_RIGHT_ARROW                        =ICON_RIGHT_ARROW_1080P;                     
			ICON_FILETYPE_NAME_BLANK                =ICON_FILETYPE_NAME_BLANK_1080P;             
			ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING     	=ICON_PLAYLIST_BAR_FOCUS_ROLLSTRING_1080P;  
			ICON_UNKNOW_FOCUS                       =ICON_UNKNOW_FOCUS_1080P;                    
			ICON_UNKNOW_LOSE                        =ICON_UNKNOW_LOSE_1080P;              
			ICON_ARROW_BACKGROUND_DOWN				=ICON_ARROW_BACKGROUND_DOWN_1080P;
			ICON_ARROW_BACKGROUND_UP				=ICON_ARROW_BACKGROUND_UP_1080P;
			ICON_ARROW_BACKGROUND					=ICON_ARROW_BACKGROUND_1080P;
			ICON_ARROW_CDBKG						=ICON_ARROW_CDBKG_1080P;
			ICON_ARROW_DOWN							=ICON_ARROW_DOWN_1080P;
			ICON_ARROW_UP							=ICON_ARROW_UP_1080P;
			ICON_ARROW_DOWN_VIDEO					=ICON_ARROW_DOWN_VIDEO_1080P;
			ICON_ARROW_UP_VIDEO						=ICON_ARROW_UP_VIDEO_1080P;
			ICON_PREV_UNSUPPORT						=ICON_PREV_UNSUPPORT_1080P;
			ICON_UNSUPPORT_VIDEO_CONFIG				=ICON_UNSUPPORT_VIDEO_CONFIG_480 ;
			ICON_TIP_BLANK						=ICON_TIP_BLANK_1080P;
			ICON_SCREEN_SAVE                      =ICON_SCREEN_SAVE_1080P;
			ICON_PC_CONNECT							=ICON_PC_CONNECT_1080P;
			break;		
#endif

		}
	}

void ChangeTV_Type()
{

	//PHWND pControl, pParentControl;
	//pControl = AWFindWinCtrlByName("WinSetup_net_menu") ;
	//TMENU *pMenu = (TMENU *)pControl->userdata ;
	//pParentControl = AWFindWinCtrlByName(pMenu->parent_menu_name) ;
	//AWHideWinControl(pControl) ;
	//pControl->winrect.top = pMenu->menu_original_top;
	//pControl->winrect.left = pMenu->menu_original_left ;
	//pMenu->menu_original_top = pMenu->menu_original_left = 0 ;
	
	
    int video_fd;
    video_appmode_t video_appmode;        
    video_fd=open("/dev/video",O_RDONLY);

    switch(CurrentOsdSize){
#ifndef SURPORT_TVM
        case OsdSize480i:
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_480I;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PB,2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PR, 0);
        #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 3);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 3);
	    #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
	    #endif
            break;
        case OsdSize480iCVBS: 
		#ifdef MALATA_VERSION
			gpio_set_FEC_high(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_480I;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
#ifdef SAMSUNG_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 0);
#else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 0);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 2);
#endif
	    #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
	    #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 1);
		    break;
        case OsdSize480p:
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_480P;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #endif
	    #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
	    #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);
            break;

	#ifdef SUPPORT_VGA
        case OsdSizeVga: 		
            video_appmode.hdmode = DISPCTL_MODE_VGA;
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGEESSIVE_G, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGEESSIVE_B, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGEESSIVE_R, 0);
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) | (1<<7));

            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);
            break;
	#endif
			
        case OsdSize576i:
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_576I;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_INTERLACE_PR, 0);
        #endif
			vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 3);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 3);
	    #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
	    #endif
			vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);
			break;
        case OsdSize576iCVBS:
		#ifdef MALATA_VERSION
			gpio_set_FEC_high(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_576I;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
#ifdef SAMSUNG_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 0);
#else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_LUMA, 0);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_SVIDEO_CHROMA, 2);
#endif
	#ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
	#endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 1);
            break;	
        case OsdSize576p: 
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_576P;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #endif
        #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
        #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);
            break;
#endif
    #ifdef TV_MODE_720P
        case OsdSize720p: 
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
            video_appmode.hdmode = DISPCTL_MODE_720P;
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #endif
        #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
        #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);				
            break;	
    #endif

    #ifdef TV_MODE_1080P
        case OsdSize1080p: 
		#ifdef MALATA_VERSION
			gpio_set_FEC_low(2)
		#endif
            video_appmode.outmode = DISPCTL_MODE_480P;
    	 #ifdef TV_MODE_1080I						
            video_appmode.hdmode =DISPCTL_MODE_1080I; 
        #else    
            video_appmode.hdmode =DISPCTL_MODE_1080P; 
	 #endif	
            video_appmode.convertion_type_v = VIDEO_APPVMODE_480_480;
        #ifdef WISTAR_VERSION
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #else
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_Y, 1);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PB, 2);
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_PROGRESSIVE_PR, 0);
        #endif
        #ifdef SUPPORT_VGA
            WRITE_MPEG_REG_ISA(PREG_PIN_MUX_2, READ_MPEG_REG_ISA(PREG_PIN_MUX_2) & (0<<7));	
        #endif
            vdac_set_output_type(VIDEO_SIGNAL_TYPE_CVBS, 3);				
            break;	
    #endif


        default:
            break;
		}

    video_appmode.convertion_type_h = VIDEO_APPHMODE_720;
    video_appmode.zoom_level = 0;
                        
    //ioctl(video_fd, VIDEOIO_FORCESETAPPMODE, &video_appmode);
    
    //ioctl(video_fd, VIDEOIO_GET_WIDEOPTION, &wide_option);
    //ioctl(video_fd, VIDEOIO_SET_WIDEOPTION, VIDEO_WIDEOPTION_WIDE);    
    
   // close(video_fd);
    unsigned video_pos[4];   
    video_pos[0] = 0;
    video_pos[1] = 0;
    video_pos[2] = 0;
    video_pos[3] = 0;
    ioctl(video_fd, VIDEOIO_SET_POSITION, &video_pos);  
    close(video_fd);
	set_current_logo_type(1);    
#if ((defined TV_MODE_720P)||(defined SUPPORT_VGA)||(defined TV_MODE_1080P))
	if(( video_appmode.hdmode==DISPCTL_MODE_720P)||( video_appmode.hdmode==DISPCTL_MODE_VGA)||( video_appmode.hdmode==DISPCTL_MODE_1080P)
		||( video_appmode.hdmode==DISPCTL_MODE_1080I))             
		load_jpeg_logo(logo_jpeg, sizeof(logo_jpeg),& video_appmode);
	else
#endif
		load_jpeg_logo(logo_jpeg480, sizeof(logo_jpeg480),& video_appmode);
	return;

//	AWHideWinControl(hwnd) ;
//	AWShowWinControl(pParentControl, 0) ;
//	AWShowWinControl(pControl, 1) ;

}
